On Tue, 2009-09-15 at 17:55 -0400, Ascii King wrote: > I want to load a page, but not run it through the wrapper. Can I shut > off the wrapper or specify different wrappers at different times? > > I have read the Catalyst::View::TT doc, but it doesn't mention this.
Someone was nice enough to answer this question for me when I posed it
on the #tt channel on irc.perl.org earlier today, so it would be rude of
me not to pass on the answer:
===== wrapper.tt =====
[% IF template.custom_wrapper;
PROCESS $template.custom_wrapper;
ELSIF no_wrapper || template.no_wrapper;
content;
ELSE;
PROCESS 'default_wrapper.tt';
END
%]
===== a_template.tt =====
[%
META custom_wrapper = 'alt_wrapper.tt';
META title = 'Alt Layout';
-%]
<!-- rest of template goes here -->
Add default and alt wrapper templates to flavour :)
Hope that makes sense!
Regards,
Denny
signature.asc
Description: This is a digitally signed message part
_______________________________________________ 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/
