On 9/30/06, Paul Makepeace <[EMAIL PROTECTED]> wrote:
I think I've just been bitten by how MACRO and RETURN work,
[% MACRO do_stuff(an_array) BLOCK %]
[% RETURN IF !an_array OR an_array.size == 0 %]
# Actually do stuff
[% END %]
[% do_stuff() %]
[%# we never get here %]
What's the right way to do what I'm trying here?
The MACRO directive inserts its code directly into the compiled
template, so in this example it's as if you'd written:
[% BLOCK %]
[% RETURN IF !an_array OR an_array.size == 0 %]
# Actually do stuff
[%# we never get here %]
--
(darren)
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates