user function for 'if' stmt

From: Date: Mon, 11 Nov 2002 01:45:24 +0000
Subject: user function for 'if' stmt
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6385@lists.php.net to get a copy of this message
Hi! I'd like to create a new function which I can implement into an 'if' statement. Should look like this {if user_right == 1} ... therefore I created a custom function: function smarty_function_user_right($params, &$smarty) { echo '1'; } my problem is that my if statement always fails. I tried to build a function with "echo" and also with "return" but it didn't work. Smarty manual didn't help me any suggestions? Christian Pontesegger

« previous php.smarty.general (#6385) next »