PDA

View Full Version : Template question


HPIA
10-30-2006, 11:04 PM
Okay, I have a question.

You know how if you want to incorporate the navbar template, you type in $navbar? Well, how would I make other templates show up? I have no idea how to do this, Im not a coder.

Does anyone know what I mean?

Kirk Y
10-31-2006, 02:04 AM
Create a new plugin using a hook location that executes on the page you want to place the variable. (Ex. If you want it on your Index, use 'forumhome_start'; if you want it in the Posbit, use 'postbit_display_start'; etc.)

$var = '';
eval('$var .= "' . fetch_template('template_name') . '";');

Substitute $var wherever you'd like the contents shown.

HPIA
10-31-2006, 02:17 AM
Thanks for this! And a big thanks to peterska2. Minutes after posting this, while just browsing, I found her? tutorial and it worked marvelously. :D

Kirk Y
10-31-2006, 10:56 AM
Yeah I was trying to find the tutorial for you, but misplaced the link, so I settled with an example. Glad you found what you were looking for either way.

And yes, she. ;)