zend framework - ZF2 get another navigation in global.php -


this navigation in global.php

'navigation' => array(             'default' => array(                     'loja' => array(                             'label' => 'loja',                             'route' => 'loja',                             'params' => array('action'=>'index'),                             'pages' => array(                                     'estoque' => array(                                             'label' => 'estoque',                                             'params' => array('action'=>'index'),                                             'action'=>'index',                                             'id' => 'estoque',                                             'route' => 'estoque',                                     )),                     ),                'suport'=> array(                     'test' => array(                             'label' => 'loja',                             'route' => 'loja',                             'params' => array('action'=>'index'),                             'pages' => array(                                     'estoque' => array(                                             'label' => 'estoque',                                             'params' => array('action'=>'index'),                                             'action'=>'index',                                             'id' => 'estoque',                                             'route' => 'estoque',                                     )),                     ),), 

when call navigation 'default' comes, want call navigation 'suport', how can it? code in layout.phtml ..

echo $this->navigation('navigation')->menu()->setulclass('nav dropdown-submenu')->rendermenu(); 

thanks :)

first create container:

    <?php $container = $this->navigation()->findonebylabel('support');?> 

read more finding nodes here: http://framework.zend.com/manual/2.2/en/modules/zend.navigation.containers.html

than use it:

    <?php echo $this->navigation()->menu()->rendermenu($container);?> 

(put in view script.)

read more in docs: http://framework.zend.com/manual/2.2/en/modules/zend.navigation.view.helper.menu.html


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -