GertMT has asked for the wisdom of the Perl Monks concerning the following question:
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 %]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Template Toolkit - problem getting data out array - AoHoA
by Your Mother (Archbishop) on Mar 07, 2014 at 19:51 UTC | |
by GertMT (Hermit) on Mar 07, 2014 at 21:17 UTC | |
|
Re: Template Toolkit - problem getting data out array - AoHoA
by MidLifeXis (Monsignor) on Mar 07, 2014 at 19:10 UTC | |
|
Re: Template Toolkit - problem getting data out array - AoHoA
by crusty_collins (Friar) on Mar 07, 2014 at 18:28 UTC | |
by GertMT (Hermit) on Mar 07, 2014 at 18:48 UTC | |
|
Re: Template Toolkit - problem getting data out array - AoHoA
by locked_user sundialsvc4 (Abbot) on Mar 08, 2014 at 03:01 UTC | |
by GertMT (Hermit) on Mar 09, 2014 at 21:48 UTC | |
|
Re: Template Toolkit - problem getting data out array - AoHoA
by GertMT (Hermit) on Mar 07, 2014 at 18:30 UTC |