Re: [SMARTY-DEV] default modifiers
| From: | Monte Ohrt | Date: | Wed, 17 Jul 2002 15:11:32 +0000 |
| Subject: | Re: [SMARTY-DEV] default modifiers | ||
| References: | 1 2 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-206@lists.php.net to get a copy of this message | ||
Andrei Zmievski wrote:
On Wed, 17 Jul 2002, Monte Ohrt wrote:Another option is to create a special modifier that means don't modify: {$var|nomodify} Would tell Smarty not to apply default modifiers to this var. We might eventually want other "special" modifiers and have modifier name conflicts, so I don't know if we'd want to go as far as using a smarty modifier or not. {$var|smarty:nomodify} Also, I don't know how intuitive "nomodify" is, maybe there is a better way. MonteAlso, default modifiers preceed any modifiers exlicitly given. So in your template you have {$var|upper}, and your default modifier is |escape:"htmlall", then your var will end up like {$var|escape:"htmlall"|upper}Yes, that's expected.The last issue is how to handle vars you don't want affected by default modifiers. Should there be a way to disable default modifiers for a certain var, or do you just explicitly string more modifiers on to "undo" them? example, {$var|unescape} turns into {$var|escape:"htmlall"|unescape}Eh, I wouldn't want to provide "reverse" modifiers for everything. Gotta be another way around it. Or tough, you wanted default modifiers, you got them applied to everything.