ZF-7062: Zend_Application_Resource_Layout: support for custom Layout Classes (My_Layout)
Description
Hi,
it would be nice to get support for custom Layout classes like My_Layout by the layout resource plugin.
currently I workaround this by using the _init() functions in Bootstrap to get the layout initialized:
protected function _initLayout () { $view = $this->getResource('View');
$options = array(
'view' => $view,
'layout' => 'layout_standard',
'layoutPath' => APPLICATION_PATH . '/layouts/scripts/',
'contentKey' => 'content', // ignored when MVC not used
'viewSuffix' => 'html',
);
Herod_Layout::startMvc($options);
$layout = Herod_Layout::getMvcInstance();
return $layout;
}
thx and greetings! marco
Comments
Posted by Ben Rexin (salz) on 2009-06-21T05:09:25.000+0000
That not an bug, create your own Resource Plugin!
/library/App/Application/Resource/Layout.php
and for the applications.ini: /application/configs/application.ini
Posted by Dolf Schimmel (Freeaqingme) (freak) on 2009-06-21T05:09:41.000+0000
This is not an issue. The resource plugins that are shipped with ZF are meant for ZF components only. If you need a resource plugin for another component you can simply extend Zend_Application_Resource_Layout or Zend_Application_Resource_ResourceAbstract.