Re: 'default' modifier
| From: | Mike Krus | Date: | Wed, 13 Jun 2001 14:04:48 +0000 |
| Subject: | Re: 'default' modifier | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-881@lists.php.net to get a copy of this message | ||
Andrei Zmievski wrote:
We'll take a look at this suggestion. This is not related to the previous request, it might be a good idea alsoto have a function to set a default value for a variable within the template. I know you can do {$foo|default:"bar"} but if you use $foo often it get ugly. It also does not seem to work well in control structures... Being able to do {setdefault name=foo value="bar"} would assign the value to $foo if it was unset or empty, and do nothing otherwise... Mike