PDA

View Full Version : make news module use 2 seperate templates?


cyr0n_k0r
07-30-2004, 12:57 AM
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.

Brian
07-30-2004, 10:08 AM
I haven't tested this, but it should work. If not though let me know...

In your forum/moudles/news.php file look for:
eval('$home[$newsid][\'content\'] .= "' . fetch_template('adv_portal_newsbits') . '";');

Replace that with:
eval('$newsbits .= "' . fetch_template('adv_portal_newsbits') . '";');

Then look for:
$DB_site->free_result($getnews);

Right above that, Add:
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.

Our Sponsors
 

cyr0n_k0r
07-30-2004, 12:19 PM
awesome. Works perfectly.