
apv at sedition
Nov 26, 2008, 2:06 PM
Views: 650
Permalink
|
|
Reasonable change to C::V::TT?
|
|
Along these lines: http://www.fayland.org/blog/2006/11/catalyst-tt- wrapper-trick.html This would allow individual responses to use the default WRAPPER, clear it and use none, or use a one-off. E.g.: $c->stash( wrapper => undef ); # clears $c->stash( wrapper => "special/section/wrapper.tt" ); Catalyst::View::TT, line 236-ish if ( $vars->{wrapper} ) { $self->template->service->{WRAPPER} = [ $vars->{wrapper} ]; } elsif ( exists $vars->{wrapper} ) # allow undef to clear wrapper { $self->template->service->{WRAPPER} = []; } If this strikes everyone as reasonable, I'll do a bit of Pod to go with it and get a diff ready. If someone has a better idea for how to handle this (I think multiple TT views is certainly a decent way to approach it but adding a package for every desired exception to the site-wide wrapper strikes me as Wrong™). -Ashley _______________________________________________ Catalyst-dev mailing list Catalyst-dev[at]lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
|