marvell has asked for the wisdom of the Perl Monks concerning the following question:
Gracious monks ...
I use Template::Toolkit and make great use of the INCLUDE dirctive. My designer has asked me to wrap each component with a comment so he can see how the end pages have been constructed.
I can give him a wrapper for each component like this:
somecomponent.tt: <!-- BEGIN $component.name ($component.modtime) --> the content of the template <!-- END $component.name -->
Of course, I can use WRAPPER and pass these variables through to the commenting wrapper, but that is more text and still requires and END a the end of the template.
In an ideal world, I'd have a flag in my config to turn this on and off, which is easy, but is there a way I can may TT wrap all my components automagically?
--
Steve Marvell
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: automatic Template component wrapper
by Herkum (Parson) on Mar 10, 2006 at 16:44 UTC | |
by marvell (Pilgrim) on Mar 10, 2006 at 19:58 UTC | |
|
Re: automatic Template component wrapper
by Aristotle (Chancellor) on Mar 11, 2006 at 06:38 UTC | |
by marvell (Pilgrim) on Mar 13, 2006 at 14:57 UTC | |
|
Re: automatic Template component wrapper
by jeffa (Bishop) on Mar 10, 2006 at 16:55 UTC | |
by marvell (Pilgrim) on Mar 10, 2006 at 20:03 UTC |