PDA

View Full Version : templates sending variables (eval)


masterross
01-17-2010, 05:51 PM
Hi guys,

Can you help me to upgrade old way to send data to templates?

this is the vB3 code

eval('$my_variable = in_array(THIS_SCRIPT, array(misc,' forum '));');

How should be look in vB4 ?

thx in advance!

GiveMeABreak
01-17-2010, 05:59 PM
$my_variable = in_array(THIS_SCRIPT, array(misc,' forum '));
$templater->register('my_variable', $my_variable);

in template {vb:raw my_variable}

masterross
01-17-2010, 10:07 PM
thx mate!