in reply to Iterating over hash of arrays in Template Toolkit

Found it.

In the central Template loop

[% FOREACH choice IN data.$type.$company.$name.choice_list %] [% data.$type.$company.$name.choice_list.$choice %]<br> [% END %]
of course, since we're dealing in this loop with an array and not a hash, 'choice' pulls out the value stored in the array, not the hash key like in the previous loops. I was referring to the index of the array element with the value in the elements - which go from 1 to 6, not 0 to 5.

The correct format was

[% FOREACH choice IN data.$type.$company.$name.choice_list %] [% choice %]<br> [% END %]
which gives me the correct output.

Thanks.




Forget that fear of gravity,
Get a little savagery in your life.