In a more general way, i expected to have module specific initialization that override the /application/Bootstrap.php initializations. maybe it's not possible, maybe it was not designed to work like taht..
any idea would be appreciated, thanks! 2009/5/7 Vadim Gabriel <[email protected]> > It would have been possible if we'd know what module was called inside the > bootstrap class. But the bootstrap class is being called before the > dispatcher (i think) and therefor we don't know at that point which module > is being called. > > > On Thu, May 7, 2009 at 2:27 PM, Karl <[email protected]> wrote: > >> You should rather call $layout = Zend_Layout::getMvcInstance(); in your >> module bootstraps, but this still doesn't solve the problem. >> As soon as you apply a different layout to any of your modules, it would >> seem as though the main layout is overwritten. >> >> According to the docs, this is possible by either using >> $layout->setLayout('admin'); or via the ini as admin.resources.layout.layout >> = "admin" but I have not yet been able to get this to work. >> >> Any ideas would be most welcome. >> >> Karl >> >> ------------------------------ >> *From:* Erwin Toze [mailto:[email protected]] >> *Sent:* 07 May 2009 12:59 PM >> *To:* Karl >> *Subject:* Re: [fw-general] Modules using zend_application >> >> 2009/5/7 Karl <[email protected]> >> >>> Hi, >>> >>> I am still trying to figure out how to have different layouts per module >>> without overriding my main applications layout, so I unfortunately don't >>> have examples for you. >>> >> >> I'm also struggling with module specific layout, for instance, if i have: >> >> two layout files: >> /application/layouts/default.phtml >> /application/layouts/admin.phtml >> >> in /application/Bootstrap.php: >> class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { >> protected function _initView() >> { >> Zend_Layout::startMVC(array('layoutPath' => >> '../application/layouts')); >> } >> } >> >> >> in /application/modules/default/Bootstrap.php: >> class Default_Bootstrap extends Zend_Application_Module_Bootstrap { >> protected function _initView() >> { >> Zend_Layout::startMVC(array('layout' => 'default')); >> } >> } >> >> >> in /application/modules/admin/Bootstrap.php: >> class Admin_Bootstrap extends Zend_Application_Module_Bootstrap { >> protected function _initView() >> { >> Zend_Layout::startMVC(array('layout' => 'admin')); >> } >> } >> >> so i expected to have different layout when i go to >> http://localhost/ //default layout >> and >> http://localhost/admin/ //admin layout >> >> but wherever i go i always have the admin layout!! >> >> does someone have a solution? >> >> Thanks >> >> > > > -- > Vincent Gabriel. > Lead Developer, Senior Support. > Zend Certified Engineer. > Zend Framework Certified Engineer. > -- http://www.vadimg.co.il/ > > > >
