[Catalyst] selectively using the wrapper
tech at swattermatter.com
Wed Sep 16 16:11:25 GMT 2009
Bill Moseley wrote:
> In my mind the wrapper is a view issue, so I set the wrapper in the
> template not in the controller. I have a wrapper that is called for
> *every* page that is used to build the page.
> META is compile time, IIRC, so I use [% page.layout = 'foo' %] then in
> wrapper.tt <http://wrapper.tt> I have a CASE statement that
> sets the wrappers based on page.layout set in the base template.
> IIRC, I use page.layout (instead of say just "layout") because WRAPPER
> does a shallow localization of the stash.
Thanks again, guys. It took me a few reads to figure out what this
meant, but I'm glad I understand it now. I agree that the wrapper should
be called from the template. I suspect it will make my life a little easier.
More information about the Catalyst