in reply to Tag libs for Template Toolkit
TIMTOWTDI! Run this through tpage:
Although i usually just type the form elements out explicitly. There really is not a whole lot of gain in abstracting these thingies, unless you are generating them dynamically. Even then, it's just as easy to use something like:[% INCLUDE input type => 'text' name => 'foo' value => 'Hello world' %] [% BLOCK input %] <input type="[% type %]" name="[% name %]" value="[% value %]" /> [% END %]
[% items = [ { name => 'foo' value='baz'} { name => 'bar' value='qux'} ] %] [% FOREACH text = items %] <input type="text" name="[% text.name %]" value="[% text.value %]" /> [% END %]
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tag libs for Template Toolkit
by Aristotle (Chancellor) on Sep 16, 2004 at 03:39 UTC | |
by jeffa (Bishop) on Sep 16, 2004 at 18:22 UTC | |
by Aristotle (Chancellor) on Sep 17, 2004 at 20:06 UTC |