GertMT has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
I created an Array of Hashes whereby two hashes again have an array. Now I'm having
trouble getting this working in Template Toolkit!
I found out how to get 1 photo out.
How to get all three (or as many that are there) in my HTML?
Thanks, GertHTML - TT code$VAR1 = [ { 'filenameLarge' => [ 'fIyvYwJWmstR.jpg', 'koeSHYEaekfv.jpg', 'CtDKXyiRXhWz.jpg' ], 'pos' => 1, 'title' => 'February event (Feb 2013)', 'link' => 'february-event-feb-2013', 'bookid' => 8, 'filenameSmall' => [ 'lAwKmMFJVQDI.jpg', 'mGNLDhwWEBHN.jpg', 'oREpowZBMYne.jpg' ] },
[% FOREACH e IN fotos %] [% e.title %] <img src="/photo/[% e.bookid %]/tn/[% e.filenameSmall.1 %]" /> [% END %]
Back to
Seekers of Perl Wisdom