Either set a stash variable indicating which wrapper you want to use,
and modify your wrapper.tt2 as follows:
[% IF stash_variable == 'thiswrapper' %]
[% WRAPPER thiswrapper.tt2 %]
[% content %]
[% END %]
[% ELSE %]
[% WRAPPER thatwrapper.tt2%]
[% content %]
[% END %]
[% END %]
or just get rid of it altogether and set the right one in your templates.
Xiao Yafeng wrote:
Hi,
I'm new to Catalyst. I'd like to use one wrapper to some
templates, the other wrapper to some other templates. But as
Catalyst;:Manual::Tutorial,
I can only define one wrapper like this:
__PACKAGE__->config(
# Change default TT extension
TEMPLATE_EXTENSION => '.tt2',
# Set the location for TT files
INCLUDE_PATH => [
MyApp->path_to( 'root', 'src' ),
],
# Set to 1 for detailed timer stats in your HTML as comments
TIMER => 0,
# This is your wrapper template located in the 'root/src'
WRAPPER => 'wrapper.tt2',
);
Thanks In advance!
------------------------------------------------------------------------
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/
--
Ben van Staveren
phone: +62 81 70777529
email: [email protected]
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/