> No, but this is a Perl issue, not a TT one. You can reverse the hash
Indeed. Many thanks for the pointer.
Implementing it isn't entirely straight forward because there
are duplicate values, so I need to reverse the keys into a hash
of lists...
In doing that, I've stumbled across something else that surprised me:
[% foo.push("bar") %]
[% foo.0 %]
I was expecting "bar".
Is that unreasonable of me? It seems that I need to do:
[% foo = [] %]
[% foo.push("bar") %]
[% foo.0 %]
If I want to push things onto my list.
I guess it looks kinda lazy here, but in my code the list is embedded in a hash
so I need to do:
[% IF ! hash.defined('foo');
hash.foo=[];
END %]
[% hash.foo.push("bar") %]
In the middle of a loop, which seems contrary to the TT DWIM way of life.
Again, many thanks Darren,
Andrew
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.ourshack.com/mailman/listinfo/templates