Guys,

Just wanted to check in with the group to make sure I'm not missing an easy way to do something. What I want to do is something like:

[% FOREACH x IN 1..20 %]
:
:
[% END %]

but of course that doesn't actually work.  I finally settled on:

[% FOREACH x IN [ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ] %]
:
:
[% END %]

as marginally better than:

[% SET x = 1 ; WHILE x <= 20 %]
:
:
        [% SET x = x + 1 %]
[% END %]

but I'm not particularly happy with it. Is there a better way that I'm not seeing? TIA.


-- Buddy

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

Reply via email to