list from field in database

Gert van Oss <[email protected]> Tue, 11 Mar 2014 09:33:27 +0100
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Message-ID <[email protected]>
hi,

I have a database field that has a list of filenames (images) separated with comma’s. Haven’t been successful in showing that via TT. Is it better to create an array on another level or should something like this be possible?

[% PERL %]
  list = split (/,/, artikelen.photo) ;
  [% END %]
  [% FOREACH e IN list %]
  <img class="myfloater" src="[% request.uri_base %]/images/photo/[% e %]" alt="" />
  [% END %]

Thanks,
Gert