use single quotes: When the parser reaches this: [% someArray = [] %] [% someArray = ["Item1","item2: " _ pageItems.section,"color"] %] After the double quote in itme2 BEFORE the concat it's looking for a comma.
Try this: [% someArray = [] %] [% someArray = ["Item1"," 'item2: ' _ pageItems.section","color"] %] Notice the singles around itme2.. Untested, just trying to help. On Wed, Feb 24, 2010 at 4:43 PM, Summer <[email protected]> wrote: > 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 > [email protected] > http://mail.template-toolkit.org/mailman/listinfo/templates > > -- Kelly Thompson Live Audio Magazine http://liveaudiomag.com
_______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates
