If you have a resources.layout.* in your application.ini, don't call startMvc() again. Use getMvcInstance() instead.
And yes, since there is a Navigation bootstrap resource, it should be possible to initialize Zend_Navigation via application.ini. I haven't used Zend_Nav yet, but looking at the docs I guess the pages could be specified this way: (example 37.10 from http://framework.zend.com/manual/en/zend.navigation.containers.html ) resources.navigation.pages.0.label = "Page 1" resources.navigation.pages.0.id = "home-link" resources.navigation.pages.1.label = "Zend" resources.navigation.pages.1.uri = "http://zend-project.com" resources.navigation.pages.1.order = 100 resources.navigation.pages.2.label = "Page 2" ... etc. -- Mon On Wed, May 6, 2009 at 5:17 PM, iceangel89 <[email protected]> wrote: > > actually i also have a application.ini that already has that, will it be ok > to repeat? if they have different values which will be effective? > > is there a way to have Zend_Navigation in application.ini? > > > vince. wrote: > > > > Hey, > > > > Both the constructor and the startMvc() static method can accept either > an > > array of options or a Zend_Config object with options in order to > > configure > > the Zend_Layout instance. > > > > Example: > > > > $options = array( 'layout' => 'foo', 'layoutPath' => '/path/to/layouts' > ); > > $view = Zend_Layout::startMvc($options)->getView(); > > > > You should read the manual. > > > > Vince. > > > > On Wed, May 6, 2009 at 11:04 AM, iceangel89 <[email protected]> wrote: > > > >> > >> how do i get view from the bootstrap file/class? > >> > >> $view = Zend_Layout::startMvc()->getView(); > >> > >> gives > >> > >> Fatal error: Uncaught exception 'Zend_Layout_Exception' with message > >> 'setOptions() expects either an array or a Zend_Config object' in > >> D:\JiewMeng\ZendFramework\library\Zend\Layout.php:234 Stack trace: #0 > >> D:\JiewMeng\ZendFramework\library\Zend\Layout.php(180): > >> Zend_Layout->setOptions(NULL) #1 > >> D:\JiewMeng\sites\zf-ims\application\modules\lab\Bootstrap.php(5): > >> Zend_Layout::startMvc() #2 > >> > >> > D:\JiewMeng\ZendFramework\library\Zend\Application\Bootstrap\BootstrapAbstract.php(580): > >> Lab_Bootstrap->_initApp() #3 > >> > >> > D:\JiewMeng\ZendFramework\library\Zend\Application\Bootstrap\BootstrapAbstract.php(533): > >> Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('app') #4 > >> > >> > D:\JiewMeng\ZendFramework\library\Zend\Application\Bootstrap\BootstrapAbstract.php(497): > >> Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap(NULL) #5 > >> > >> > D:\JiewMeng\ZendFramework\library\Zend\Application\Resource\Modules.php(84): > >> Zend_Application_Bootstrap_BootstrapAbstract->bootstrap() #6 > >> > >> > D:\JiewMeng\ZendFramework\library\Zend\Application\Bootstrap\BootstrapAbstra > >> in D:\JiewMeng\ZendFramework\library\Zend\Layout.php on line 234 > >> -- > >> View this message in context: > >> > http://www.nabble.com/Getting-view-from-Bootstrap-%28ZF1.8%29-tp23401867p23401867.html > >> Sent from the Zend Framework mailing list archive at Nabble.com. > >> > >> > > > > > > -- > > Vincent Gabriel. > > Lead Developer, Senior Support. > > Zend Certified Engineer. > > Zend Framework Certified Engineer. > > -- http://www.vadimg.co.il/ > > > > > > -- > View this message in context: > http://www.nabble.com/Getting-view-from-Bootstrap-%28ZF1.8%29-tp23401867p23402934.html > Sent from the Zend Framework mailing list archive at Nabble.com. > >
