Quote:
Originally Posted by Disasterpiece
PHP Code:
vB_Template::preRegister('template_name',array('foo' => $bar));
...
$templater->register('foo', $bar);
First if you don't create an instance of the template first, second if you already have an instance
like:
PHP Code:
$templater = vB_Template::create('template_name');
$templater->register(...)
Inside the template they exist as $foo so you can write:
HTML Code:
<vb:if condition="$foo == 'bar'">
display this
<vb:else />
otherwise this
</vb:if>
|
Hi, thank you for answer me.
Actually, I added the $variable to header instance, and i'm available to print $foo in the template, but it don't work in the condition.
Did you try your code? If so, i'll recheck my code, but this is pretty simple...
Thank you!