|
Posted by Samuel Abels on 07/24/05 12:57
Hello,
I am trying to invoke a PHP function inside a smarty template:
test.php:
------
function myfunction($arg) { echo $arg }
$smarty->assign('myfunction', myfunction);
------
test.tmpl:
------
{$myfunction("Test")}
------
Smarty error: [in test.tmpl line 1]: syntax error: unrecognized tag:
$lang("Test") (Smarty_Compiler.class.php, line 436)
in /home/www/web222/html/debain.org-step2/tefinch/smarty/Smarty.class.php on line 1088
I also tried playing around with the syntax in the template a bit, but
to no avail. Is there a way to do this?
Thanks,
-Samuel
Navigation:
[Reply to this message]
|