Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Dev
Reasonable change to C::V::TT?
 

Index | Next | Previous | View Flat


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

Subject User Time
Reasonable change to C::V::TT? apv at sedition Nov 26, 2008, 2:06 PM
    Re: Reasonable change to C::V::TT? abw at wardley Nov 27, 2008, 12:18 AM
        Re: Reasonable change to C::V::TT? jayk at ion0 Nov 30, 2008, 10:36 PM
    Re: Reasonable change to C::V::TT? jgottshall at capwiz Dec 1, 2008, 11:23 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.