Results 1 to 3 of 3

Thread: make news module use 2 seperate templates?

  1. #1

    Default make news module use 2 seperate templates?

    If everyone notices, things like the news archive and latest topics use 2 different templates.

    News archive
    and news archive bits

    one defines the area around the content, while the other has the actually content.

    Is there a way to make the news module do the same thing?

    What im trying to do is I have my main news module, but the entire news template has the table settings and all that stuff that defines the way the news module looks.

    What I want is a seperate template that defines what the news module looks like all around the content.. and then the adv_portal_news would just have the content of the posts.

    If my description isnt good enough let me know and I will provide a screen shot of what I am talking about.

  2. #2
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: make news module use 2 seperate templates?

    I haven't tested this, but it should work. If not though let me know...

    In your forum/moudles/news.php file look for:
    PHP Code:
    eval('$home[$newsid][\'content\'] .= "' fetch_template('adv_portal_newsbits') . '";'); 
    Replace that with:
    PHP Code:
    eval('$newsbits .= "' fetch_template('adv_portal_newsbits') . '";'); 
    Then look for:
    PHP Code:
        $DB_site->free_result($getnews); 
    Right above that, Add:
    PHP Code:
    eval('$home[$newsid][\'content\'] .= "' fetch_template('adv_portal_newsmain') . '";'); 
    Then just create a new template called 'adv_portal_newsmain' and add the variable $newsbits where you would like the news to appear in that template.

  3. #3

    Default Re: make news module use 2 seperate templates?

    awesome. Works perfectly.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. News Digest Module
    By Morrus in forum Feedback & Suggestions
    Replies: 7
    Last Post: 06-05-2005, 07:29 PM
  2. How to recreate the news module?
    By HumanNature in forum Troubleshooting / "How do I..." Questions
    Replies: 6
    Last Post: 07-21-2004, 10:09 PM
  3. Adding Module: Templates Used blocked
    By Edric in forum Troubleshooting / "How do I..." Questions
    Replies: 4
    Last Post: 07-08-2004, 01:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •