The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Displaying a template within the header template?
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: Code:
{vb:raw show_simpleWord} PHP Code:
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: PHP Code:
PHP Code:
What am I doing wrong in trying to insert the template into the header? Any help appreciated. Cheers, |
#2
|
||||
|
||||
I was just replying to someone wanting to do something similar in the footer template. The header template, just like the footer and headinclude template, gets rendered early on (check class_bootstrap.php). You will have to pick a hook location that is rendered before the template is rendered, or rerender it.
|
#3
|
|||
|
|||
Thanks for that Lynne, I tried using global_start which I thought would precede everything else but no luck. However (as Seven Skins has said in the thread you mentioned) I too can output values directly from the plug-in, but I can't seem to insert a template.
So where as this works: Hook: global_start PHP Code:
Hook: global_start PHP Code:
|
#4
|
||||
|
||||
Try something more like this:
PHP Code:
Did you look in the file I told you to? You'll see the hook location parse_templates right above where the templates are rendered. Why not try that hook location? |
#5
|
|||
|
|||
Gah, I totally missed that sorry. And thanks - changing the hook to parse_templates with the original code works perfectly
Thanks again. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|