You should be outputing only the current address each time through the
loop. Here's an example:
[%- mylist = [ 'one' ] %]
[%- mylist = [ 'one', 'two' ] %]
[%- mylist = [ 'one', 'two', 'three' ] %]
[%- FOREACH item IN mylist %]
[%- IF loop.max() == 0 -%]
[%- item %].
[%- ELSIF loop.last() -%]
[%- IF loop.max() > 1 %]or [% END %][% item %].
[%- ELSE %][% item %], [% END %]
[%- END %]
I put one of the [% END %]s at the end of the line to preserve the trailing
space character in the output. Adjust the style to your liking.
Ronald
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates