[Solar-talk] layout path stack

Jeff Surgeson solar at 3hex.com
Mon Oct 1 17:08:53 CDT 2007


Cheers Rodrigo

> The layout path stack is built using the class parents, so if your app
> doesn't extend Solar_App_Base, you won't have Solar/App/Base/Layout in
> the stack.

Of course, I have always extended Solar_App_Base before and not 
Solar_Controller_Page.

> Well, I think Solar is doing the right thing, only adding to the stack
> layout dirs related to the app class and its parents. This way, it
> does not force you to use Solar/App/Base/Layout as a fall back. It
> seems a good thing to not add a layout path from an *external app*
> (even if it is a Solar app).

Yea your are right I should stop being lazy! :-(

> At the same time, you can add it easily extending your apps from
> Solar_App_Base *or* adding the path in your
> Vendor_App_Base::_setLayoutTemplates():
>
>     protected function _setLayoutTemplates()
>     {
>         parent::_setLayoutTemplates();
>         $this->_view_object->addTemplatePath('Solar/App/Base/Layout');
>     }
>
> I hope this is correct. =)

As always I am sure it is :-) thanks for taking the time.

Nice work on your user/acl stuff by the way.

-- 
...........::::::...........
Jeff Surgeson / South Africa


More information about the Solar-talk mailing list