[Catalyst] TT2 multiple subtemplates
Evan Carroll
me at evancarroll.com
Wed Aug 10 19:11:46 GMT 2011
The idea behind WRAPPER is that one of these includes is magical (CONTENT)
TOP
[% CONTENT %]
BOTTOM
That's not to say you can't more complex wrappers with INCLUDES or PROCESS
TOP
[% CONTENT %]
[% INCLUDE foo.tt %]
BOTTOM
It just means that the content being WRAPPED is the destination
template, and TT will use the WRAPPER as a post-processor of sorts.
Now, if you want something like this:
TOP
[% CONTENT %]
[% INCLUDE $foo %]
BOTTOM
Where `$foo` is set in whatever template CONTENT targets.. you can do
that too, though I wouldn't know the exact syntax. It'd probably
consist of setting
DEFAULT foo = 'right_content.tt';
In the CONTENT template.
--
Evan Carroll - me at evancarroll.com
System Lord of the Internets
web: http://www.evancarroll.com
ph: 281.901.0011
More information about the Catalyst
mailing list