How to render Zend_Navigation in different section in xml? Here my xml
<configdata>
<admin>
.....
</admin>
<default>
.....
</default>
</configdata>
开发者_JAVA技巧
I'm already testing this but render of menu get same result section admin
$navContainerConfig = new Zend_Config_Xml(APPLICATION_PATH . '/configs/navigation.xml', 'default');
$navContainer = new Zend_Navigation($navContainerConfig);
$view->navigation = $view->navigation()->setAcl($this->acl)->setRole($role)->menu($navContainer);
$navContainerConfig = new Zend_Config_Xml(APPLICATION_PATH . '/configs/navigation.xml', 'admin');
$navContainer = new Zend_Navigation($navContainerConfig);
$view->navigationAdmin = $view->navigation()->setAcl($this->acl)->setRole($role)->menu($navContainer);
You have to pass the Zend_Navigation_Container directly to the navigation view helper:
$view->navigationDefault = $view->navigation($defaultNavContainer)->setAcl($this->acl)->setRole($role);
$view->navigationAdmin = $view->navigation($adminNavContainer)->setAcl($this->acl)->setRole($role);
精彩评论