in reply to Re^2: What are your favorite tools for building a static site?
in thread What are your favorite tools for building a static site?

MACRO and BLOCK are also quite useful. You can use them to build recursive template routines. Don't like the word routine here, but it kinda fits.

builds a string containing the number of "A"'s specified. (dumb example, and it may not work, not tested, but you get the idea) I'm ignoring the argument for/against doing this in template code. The HTML::Template guys will put a hit out on me. :)

[% MACRO gen_a_list(number_of_as) BLOCK %] [% a_string = "" %] [% IF number_of_as > 0 %] [% a_string = "A" _ gen_a_list(number_of_as - 1) %] [% END %] [% a_string %] [% END %]
I really enjoy working with TT. I haven't checked out the book yet. Is it decent?