szabgab has asked for the wisdom of the Perl Monks concerning the following question:
I use Template Toolkit to display an HTML page.
I have code like this:
that worked well, until today when I added a key to the 'kw' hash called 'keys'.<% FOR k IN kw.keys.sort %> <li><% k %> <ul> <% FOR page IN kw.$k.keys %> <li><a href="/<% page %>"><% kw.$k.$page %></a></li> <% END %> </ul> </li> <% END %>
Now, instead of fetching all the keys of kw, it only fetches the single field which is called 'keys'. So instead of displaying a nice list of items, it only displayes one.
How can I convince TT to use the keys function to retreive all the keys again?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: A key called keys in a hash in Template Toolkit
by mbethke (Hermit) on Mar 08, 2013 at 16:30 UTC | |
Re: A key called keys in a hash in Template Toolkit
by Anonymous Monk on Mar 08, 2013 at 23:58 UTC | |
Re: A key called keys in a hash in Template Toolkit (define_vmethod)
by Anonymous Monk on Mar 09, 2013 at 00:22 UTC |
Back to
Seekers of Perl Wisdom