unlinker has asked for the wisdom of the Perl Monks concerning the following question:
Venerable Monks,
Is it possible to process a TT template so that only the INCLUDE (or the INSERT) directives are processed? For example if my template (say outer.tt) is :
and inner.tt is:Hi [% name %], Some Text here.... [% INCLUDE inner.tt %] Some more text here.....
I would like to generate the template string:Product ID: [% product_id %]
Hi [% name %], Some Text here.... Product ID: [% product_id %] Some more text here.....
so that only the INCLUDE directive is processed and a new template is generated?
Many Thanks...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Partially process'ing Template::Toolkit templates
by roboticus (Chancellor) on Nov 15, 2012 at 02:28 UTC | |
Re: Partially process'ing Template::Toolkit templates
by chromatic (Archbishop) on Nov 15, 2012 at 06:20 UTC |
Back to
Seekers of Perl Wisdom