Hello,

I am having a devil of a time.

When I do this:

[% somvar = "Testing a string: " _ pageItems.section %]
[% somvar %]

It works. I get what I am expecting to print to screen.

BUT

This WILL NOT work and I constantly get an error of: unexpected token (_)

[% someArray = [] %]
[% someArray = ["Item1","item2: " _ pageItems.section,"color"] %]

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"] %]





      
_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to