Hi,
I have a navigation.xml
file:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<nav>
<programm_nav>
<label></label>
<uri>#</uri>
<pages>
<all>
<label>test1</label>
<resource>default:programme</resource>
<module>default</module>
<controller>programme</controller>
<action>list</action>
<privilege>index</privilege>
</all>
</pages>
</programm_nav>
<acc_nav>
<label></label>
<uri>#</uri>
<pages>
<ueb>
<label>test2</label>
<resource>default:account</resource>
<module>default</module>
<controller>account</controller>
<action>index</action>
<privilege>index</privilege>
</ueb>
</pages>
</acc_nav>
</nav>
</config>
This config file defines two navigation boxes, one programm_nav and the other acc_nav.
In my bootstrap I do the following:
$navContainerConfig = new Zend_Config_Xml ( APPLICATION_PATH .
'/configs/navigation.xml', 'nav');
$navContainer = new Zend_Navigation ( $navContainerConfig );
$view->navigation ( $navContainer )->setAcl ( $this->_acl )
->setRole ( Zend_Registry::get ( 'role' ) );
In my view I display the navigation:
$navSec = $this->navigation ()->findOneByLabel ( 'acc_nav' );
echo $this->navigation ()->menu ()->renderMenu ( $navSec );
But no matter how I define $navSec
I always displays programm_nav
and never another box. acc_nav
is never displayed.
Any idea?