Continuing from the breadcrumbs post, it is possible to render more than one zend navigate menu. The bootstrap code looks for different sections of the xml, which we tweak like this:

<configdata>
  <nav>
    <headnav>
     <home>.....</home>
    </headnav>
    <footnav>
       <etc></etc>
    </footnav>
  </nav>
<configdata>

and the bootstrap we can say:

$config = new Zend_Config_Xml(APPLICATION_PATH.'/configs/navigation.xml','nav');
 $view->headnav = new Zend_Navigation($config->headnav);
 $view->footnav = new Zend_Navigation($config->footnav);
 Zend_Registry::set('HeadNavigation', $view->headnav);
 Zend_Registry::set('FootNavigation', $view->footnav);

we can now use both menus in our layout like this:

echo $this->navigation()->menu()->renderMenu($this->headnav);
 echo $this->navigation()->menu()->renderMenu($this->footnav);

However I am yet to discover what to do to get the breadcrumbs working like this!

Advertisements