Re: custom functions
| From: | Ivo Jansch | Date: | Thu, 21 Feb 2002 10:17:33 +0000 |
| Subject: | Re: custom functions | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2810@lists.php.net to get a copy of this message | ||
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