On Fri, Aug 01, 2003 at 01:52:55AM -0700, Ask Bj�rn Hansen wrote:
> With TT I end up with something like the following to do the same:
> 
> [% jobs = [];
>     FOR j = company.Jobs;
>       str = '<a href="/job/' _ j.ID _ '">' _ j.Title;
>       jobs.push(str);
>     END %]
> Blah: [% jobs.join(", ") %]<br />

I think I would have skipped the join(), and just done everything in the
loop. 

Blah: 
[% FOREACH job = company.Jobs %]
  <a href="/job/[% job.ID %]">[% job.Title %]</a>
  [% ", " UNLESS loop.last %]
[% END %]
<br />

-- 
Trond Michelsen


_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to