Re: custom functions
| From: | chiefmonkey | Date: | Thu, 21 Feb 2002 10:42:06 +0000 |
| Subject: | Re: custom functions | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2811@lists.php.net to get a copy of this message | ||
Thanks,
I will try that.
GeorgeAt 11:17 21/02/2002 +0100, Ivo Jansch wrote:
Hi, george wrote:getimage("images") and echo the value of $path it returns images, but when I place it within Smarty.addons and call it from a template the and echo the value of path it's "Array" ??That's because of the way Smarty passes params to you. If your function is normally this: function func_getimage($path) { // lalalalala... } then when using it in smarty, change it to this: function smarty_func_getimage($params) { $path = $params["path"]; // lalalalalala } then it should work. Greetings, Ivo -- Ivo Jansch <ivo@ibuildings.nl> ibuildings.nl BV - information technology http://www.ibuildings.nl --- You are currently subscribed to smarty as: chiefmonkey@wisemonkeydesign.co.uk To unsubscribe send a blank email to $subst('Email.Unsub') Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/