I have a navigation.xml file:

<?xml version="1.0" encoding="UTF-8"?>

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?

Accepted Answer

findOneByLabel('acc_nav'); will search for text in <label>-tags as there is nog acc_nav value. It won't find it.

Written by tom
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki