[Solar-talk] stack error
Paul M Jones
pmjones at ciaweb.net
Sat Mar 31 12:51:03 PDT 2007
On Mar 22, 2007, at 10:28 AM, Rodrigo Moraes wrote:
> On 3/22/07, Jeff Surgeson wrote:
>> Do you have a quick fix :-)
>
> Can I? This is quick. :)
>
> The quick solution is - add this to your app (I used a hardcoded
> vendor name - you can borrow the logic from the the current page
> controller to make it dynamic):
>
> protected function _setLayoutTemplates($view)
> {
> parent::_setLayoutTemplates($view);
>
> $path = str_replace('_', DIRECTORY_SEPARATOR,
> 'Vendor_App_Layout');
>
> $view->addTemplatePath($path);
> }
>
> Solar_App_Layout doesn't exist anymore because it was moved to
> Solar_App_Base_Layout. It makes sense - all layout dirs are now
> namespaced according to an app controller. So there are some ways you
> can add Vendor_App_Layout to the stack, or maybe you shouldn't and
> instead use Vendor_App_Base_Layout, and extend all your apps from
> Vendor_App_Base.
Rodrigo has exactly the right answer here; I'm trying to use stacks-
by-inheritance in more places where they make sense, and the app
classes can definitely benefit from clearer hierarchy.
--
Paul M. Jones <http://paul-m-jones.com>
Solar: Simple Object Library and Application Repository
for PHP5. <http://solarphp.com>
Savant: The simple, elegant, and powerful solution for
templates in PHP. <http://phpsavant.com>
More information about the solar-talk
mailing list