This topic is locked

Using Smarty in Events

8/23/2007 12:49:04 AM
PHPRunner General questions
F
fsteves author

How would I do something like this in a BeforeShowAdd/Edit event:
$smarty->assign("myname",$myname);

$smarty->assign("myhub",$myhub);
Currently, I am adding it manually to the source file for PHPRunner, but thats not the most ideal situation.

Alexey admin 8/23/2007

Clarity,
just add globalstatement to your event code:

global $smarty;

$smarty->assign("myname",$myname);

$smarty->assign("myhub",$myhub);

F
fsteves author 8/23/2007

That is EXACTLY what I was looking for, awesome. Now upgrading PHPRunner isn't as painstaking, because I have modified code in 10 different source files...Takes 30 minutes to transfer it all over