On Wed, Feb 24, 2010 at 4:43 PM, Summer <[email protected]> wrote:
>
> Hello,

> This works:
> [% someArray = ["Item1","item2: $pageItems.section","color"] %]
>
> The problem with the latter is sometimes my data structures are complex and I 
> then get errors when I try to do something like:
>
> "item2: $pageItems.section.${color}.type"
>
> Any suggestsions on make this work?
> [% someArray = ["Item1","item2: " _ pageItems.section,"color"] %]

It won't work unless you change the TT2 parser ...

How about simplifying your second approach with an intermediate variable?

[% item_two    = $pageItems.section.${color}.type;
     someArray = ["Item1","item2: $item_two","color"] %]


Clayton
--

Clayton Scott
[email protected]

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to