Re: [SMARTY] Bug with smarty:nodefaults and arrays in sections?
| From: | messju mohr | Date: | Wed, 02 Jul 2003 17:17:25 +0000 |
| Subject: | Re: [SMARTY] Bug with smarty:nodefaults and arrays in sections? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9815@lists.php.net to get a copy of this message | ||
On Wed, Jul 02, 2003 at 05:24:27PM +0200, Karsten Dambekalns wrote:
> Hi!
>
> I am using 'strip_tags' as default modifier (through
> $default_modifiers). But I need to circumvent this for some variables,
> and thus tried the 'nodefaults' modifier.
>
> First: The documentation says to use 'nodefaults' which didn't work, it
> seems as if it must be 'smarty:nodefaults'.
yes, this was fixed in the cvs's docs some weeks ago.
> Second: While this works mostly, it doesn't for some cunstructs
> involving arrays and sections. Here's an example:
>
> ---- snip PHP ----
> // in my setup code
> $smarty->default_modifiers = array('strip_tags');
> ...
> // build some variable array that contains HTML
> $urls[] = "...";
> // assign it
> $smarty->assign('urls', $urls);
> ---- snip PHP ----
>
> ---- snip TPL ----
> {section name=inhalt1 loop=$td}
> {include file="..." r1=$td[inhalt1].lastname
> r2=$urls[inhalt1]|smarty:nodefaults}
> {/section}
> ---- snip TPL ----
>
> The 'smarty:nodefaults' does not have any effect. Why? Is this a
> limitation that I should be aware of (and which would make the thing
> useless for me :(), or is this a bug?
hmm, this works for me.
> I am using Smarty 2.5.0, btw.
>
> TIA,
> Karsten