PDA

View Full Version : Adding variable into the headinclude template?


mrbiesheuvel
12-26-2011, 11:37 AM
I wrote a plugin to put some variables into the headinclude template:

$include = '<!-- Dit is een test -->';

vB_Template::preRegister('headinclude',array('incl uded_header' => $include));

The hook is init_startup

I have also tried parse_templates as hook but it keeps givin an empty space it as if the variable was never set to the template?

Can somebody tell me what I'm doing wrong?

kh99
12-26-2011, 01:16 PM
It works for me, using hook parse_templates. You put {vb:raw included_header} in the headinclude template, right? Are you sure you're viewing the correct style?

mrbiesheuvel
12-29-2011, 06:16 AM
I've disabled hooks and removed the plug in. Then I wrote a new plugin and now everything works like a charm.

Thank you for your time.