[SMARTY] php function call

JM <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
Ok I have a group of Smarty variable assignments that I want to put in
a php function so I can call it at various points in the script.
However, it's not returning any data when I call the function. Any
ideas?

<?php 
function meat($obj)
{
 $obj->assign('template_var1', $var1);
 $obj->assign('template_var2', $var2);

 return $obj;
}

// Smarty setup and object blah blah

$template = "page.htm";
$var1 = "yes";
$var2 = "no";

meat($obj);

$smarty->display($template);

?>

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.