Thanks for pointing out Template::Toolkit. I had looked at it a while ago, but never got around to really examining it. Now that I've taken a closer look, it will probably do quite nicely for satisfying the little annoyances I'd been experiencing with the other toolkits. WRAPPER is cool, and I can tell that I am going to enjoy FILTER when I get to it.
Once I figure out how to build my breadcrumb trails and sitemaps, I'll be a happy geek.
| [reply] |
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? | [reply] [d/l] |
| [reply] |