Maybe something like this gets you there..?
[% FOREACH country IN all_content.keys.sort %]
<h3>[% country %]</h3>
[% FOREACH line IN all_content.$country %]
[% line.name %]<br />
[% line.street %]<br />
[% line.city %]<br />
[% END %]
[% END %]
> On 04 Feb 2015, at 12:13, thorshand <[email protected]> wrote:
>
> Hi,
>
> Is it possible to iterate over a key value, like :
>
> <% foreach c in comment({id_table = 'Blog'}) %>
> <% c.date %> <% c.id %>
> <% end %>
>
> comment is a resulset of dbix search with columns : id, id_table, name, date,
> ...
> I would like to make one dbi request (don't include where clause in
> resultset) to do this after :
>
> <% foreach table in ('Blog', 'Wiki' ...) %>
> <% foreach c in comment({id_table = table}) %>
> <% c.date %> <% c.id %>
> <% end %>
> <% end %>
>
> Thanks
> _______________________________________________
> templates mailing list
> [email protected]
> http://mail.template-toolkit.org/mailman/listinfo/templates
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates