2009年3月28日星期六

Re: [fw-mvc] Layout before dispatch

This way I need to make it in every controller or inherit all
controllers from some basic one. But it's not convenient at all.
Can I make it once and for all somewhere inside front controller or
somewhere else?

On 3/28/09, Petre Balau <petre.balau@yahoo.com> wrote:
> Do it in the init function of the controller:
>
> Zend_Layout::getMvcInstance()->setLayout(...);
>
> you might need to set the layout path too,
>
> see: http://framework.zend.com/apidoc/core/Zend_Layout/Zend_Layout.html
>
>
>
> Regards,
> Peter
>
> Hi,
>
> I need to set path to layout folder depending on module name.
> And as I understand it should be done before front controller dispatch.
> But the name of the module by that time is unknown.
> Please, suggest some solution.
>
> K.L.

没有评论: