PDA

View Full Version : template inside template


testbot
12-07-2009, 01:08 PM
can you include a template inside another template? if so how?

thank you!!!

Lynne
12-07-2009, 02:20 PM
If you look at a template like the FORUMHOME template, you can see it includes the $header template, the $headinclude template, the $navbar template, etc. So, yes, it can be done. You eval the template to a variable:
eval('$my_template = "' . fetch_template('template') . '";');

testbot
12-07-2009, 02:23 PM
ok, so a plugin with eval will put it into a variable and then use that variable in the template.... thanks!