Log in

View Full Version : how add new template (not style)


mosz
10-19-2008, 06:32 PM
Hello

I have problem like in topic.
I have vb 3.7.x
I create new simple template (smth like footer - only simple html, without php vars).
The name of tempalte is "serwery".
Now I want include this template in to some other template:
FORUMHOME, SHOWTHREAD... etc.

I'm adding var $serwery, but it doesn't work :(

How do this ?

Lynne
10-19-2008, 07:12 PM
You need to eval the template somewhere to be able to use it. You can use a plugin to do it but pick a hook that is evaled prior to the other template you are calling this new template in (I called the template "servery_template' in this example).

eval('$serwery .= "' . fetch_template('serwery_template') . '" . ", ";');You'll also have to make sure you cache the template (hook cache_templates):

$globaltemplates[] = 'serwery_template' ;

mosz
10-19-2008, 07:34 PM
thx for answer :)
i will try it ;)

greetings