[Catalyst] Overriding Catalyst::View::TT WRAPPER

Bill Moseley moseley at hank.org
Wed Dec 1 00:39:01 GMT 2010

On Mon, Nov 29, 2010 at 5:27 PM, Sam Kaufman <samuel.c.kaufman at gmail.com>wr=

> I've found the easiest way is to have some logic in your wrapper:
> something like this:
> [%
>  IF no_wrapper;
>  content;
>  ELSE;
>  content WRAPPER site/html + site/layout;
> END;
> %]

I tend to use a CASE statement in my wrapper to allow for different layouts.

so $c->stash(no_wrapper =3D> 1) and it won't be wrapped.

Yes, but I also allow templates to specify their layout.  So for an action
/foo/bar  I might have /foo/bar.tt and in bar.tt:

[%   page.layout =3D 'cms'; # override default layout %]

-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20101130/c5ff6=

More information about the Catalyst mailing list