pues mi archivho donde tengo el layout se llama master.phtml, el tema que lo tengo asi el initNavigation :
Código PHP:
Ver original$this->bootstrap('layout');
$layout = $this->getResource('master');
$view = $layout->getView();
$navContainerConfig = new Zend_Config_Xml(APPLICATION_PATH.'/configs/navigation.xml', 'nav');
$navContainer = new Zend_Navigation($navContainerConfig);
$view->navigation($navContainer);
y mi xml es
Código XML:
Ver original<?xml version="1.0" encoding="UTF-8"?>
<configdata>
<nav>
<home>
<label>Home</label>
<url>/</url>
<pages>
<servicios>
<label>Servicios</label>
<url>/static-content/servicios</url>
</servicios>
<trabajos>
<label>Trabajos</label>
<url>/static-content/trabajos</url>
</trabajos>
<contacto>
<label>Contacto</label>
<url>/contacto/index</url>
</contacto>
</pages>
</home>
</nav>
</configdata>
y me tira el error:
Fatal error: Call to a member function getView() on a non-object in C:\xampp\htdocs\jc\application\Bootstrap.php on line 51
y si en vez de poner master le pongo 'layout' me tira el error :
Fatal error: Uncaught exception 'Zend_Navigation_Exception' with message 'Invalid argument: Unable to determine class to instantiate' in C:\xampp\htdocs\Zend\library\Zend\Navigation\Page. php:261 Stack trace: #0 C:\xampp\htdocs\Zend\library\Zend\Navigation\Conta iner.php(117): Zend_Navigation_Page::factory(Array) #1 C:\xampp\htdocs\Zend\library\Zend\Navigation\Conta iner.php(172): Zend_Navigation_Container->addPage(Array) #2 C:\xampp\htdocs\Zend\library\Zend\Navigation.php(4 6): Zend_Navigation_Container->addPages(Object(Zend_Config_Xml)) #3 C:\xampp\htdocs\jc\application\Bootstrap.php(54): Zend_Navigation->__construct(Object(Zend_Config_Xml)) #4 C:\xampp\htdocs\Zend\library\Zend\Application\Boot strap\BootstrapAbstract.php(669): Bootstrap->_initNavigation() #5 C:\xampp\htdocs\Zend\library\Zend\Application\Boot strap\BootstrapAbstract.php(622): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('navigation') #6 C:\xampp\htdocs\Zend\library\Zend\Application\Boot strap\BootstrapAbstract.php(586): Zend_Application_Boots in C:\xampp\htdocs\Zend\library\Zend\Navigation\Page. php on line 261
A ver que alma caritativa me echa un cable , gracias