[SMARTY] Invoking a function that wass passed to smarty

Samuel Abels <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <1122199032.18571.9.camel@chef>
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

-- 
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.