saajjj
12-01-2009, 08:28 PM
Hello,
I've made a very simple template (called tmplt_simpleWord) which is just a single word: test
I want to display this template in the header.
In the header template, I've got:
{vb:raw show_simpleWord}
The plug-in is:
$templater = vB_Template::create('tmplt_simpleWord');
$templateValues['show_simpleWord'] = $templater->render();
vB_Template::preRegister('header', $templateValues);
I've tried this with the following hooks but none of them does anything to the header:
global_start
process_templates_complete
I've been successful in inserting the same template into FORUMHOME by switching the last line of the plugin from:
vB_Template::preRegister('header', $templateValues);
to
vB_Template::preRegister('FORUMHOME', $templateValues);
, setting the hook to forumhome_start and adding the same template code to the FORUMHOME template.
What am I doing wrong in trying to insert the template into the header?
Any help appreciated.
Cheers,
I've made a very simple template (called tmplt_simpleWord) which is just a single word: test
I want to display this template in the header.
In the header template, I've got:
{vb:raw show_simpleWord}
The plug-in is:
$templater = vB_Template::create('tmplt_simpleWord');
$templateValues['show_simpleWord'] = $templater->render();
vB_Template::preRegister('header', $templateValues);
I've tried this with the following hooks but none of them does anything to the header:
global_start
process_templates_complete
I've been successful in inserting the same template into FORUMHOME by switching the last line of the plugin from:
vB_Template::preRegister('header', $templateValues);
to
vB_Template::preRegister('FORUMHOME', $templateValues);
, setting the hook to forumhome_start and adding the same template code to the FORUMHOME template.
What am I doing wrong in trying to insert the template into the header?
Any help appreciated.
Cheers,