> hello all,
> is there a way to tell the template toolkit iterator to not map hashs into lists, either using the template syntax or
> the coniguration options? Best Rgds,
The iterator has to iterate over something. For hashes it can be either the keys or the values. You can get either behaviour using the examples below:
[% hash = {
foo = 'bar'
baz = 'boo' }
%]
[% FOREACH key = hash.keys %]
key: [% key %]
value: [% hash.$key %]
[% END %]
[% FOREACH val= hash.values %]
value: [% val %]
[% END %]
Hope this helps
S
-----Original Message-----
From: Ghais Issa [mailto:[EMAIL PROTECTED]]
Sent: 01 August 2005 19:46
To: templates@template-toolkit.org
Subject: [Templates] FOREACH loop help
_______________________________________________
templates mailing list
templates@template-toolkit.org http://lists.template-toolkit.org/mailman/listinfo/templates