Re: list from field in database

Andy Wardley <[email protected]> Tue, 11 Mar 2014 08:50:41 +0000
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Message-ID <[email protected]>
On 11/03/2014 08:33, Gert van Oss wrote:
> I have a database field that has a list of filenames (images) separated with comma’s.

Hi Gert,

Try this:

   [% FOREACH e IN artiklen.photo.split(',') %]
      ...
   [% END %]

Further detail here:

   http://www.template-toolkit.org/docs/manual/VMethods.html#method_split

Cheers
Andy