Zend Navigation add extra id

Posted by lander on Stack Overflow See other posts from Stack Overflow or by lander
Published on 2010-06-01T18:59:29Z Indexed on 2010/06/01 19:03 UTC
Read the original article Hit count: 287

I made a menu with zend_navigation, using an ini file. That work well. If I look at the code, i see that zend has added a class, to the ul element.

With a name that i use in my ini file. But now I want to add also a id to the ul element. How can I do this?

protected function _initNavigation()
{
    $this->bootstrap('layout');
    $layout = $this->getResource('layout');
    $view   = $layout->getView();

    $iniOptions = array('allowModifications' => true);
    $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/navigation.ini', 'nav', $iniOptions);
    $config->id = 1;        

    $navigation = new Zend_Navigation($config->navigation);        
    $view->navigation($navigation);
}

© Stack Overflow or respective owner

Related posts about php

Related posts about zend-framework