Hello Gernot!
On Thursday, October 16, 2003 at 10:46, Gernot Homma wrote:
> [...]
> is there a way to pass the expressions ${i.name} through a filter, like
> [% xxx(myvar = "abc('{$i.name} | html_entity ', '${i.nr}')" %]
> (i know that this syntax does'nt work)
What about storing the value in a temporary variable? For example:
[% FOREACH i = list %]
[% encoded_name = i.name | html_entity %]
[% xxx("abc('$encoded_name', '${i.nr}')") %]
[% END %]
Following this approach even makes the code easier to read! Writing
all in one line may be fine at first but it won't be such a joy
in the long run when you have to maintain the code.
Best regards,
Axel
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates