Hello,

I have my site navigation defined in an xml file. I am rendering the page
submenu from the config as follows:
layout.phmtl
$rootPage = $this->navigation()->getContainer()->getPages();
                                                foreach($rootPage as $page) { 
                                                        
if($page->isActive(true)) { 
                                                                echo 
$this->navigation()->menu()->renderMenu($page, array('maxDepth'
=> 4));
                                                                break;
                                                        }
                                                }

someController.php
public function preDispatch(){
                        $activeNav = $this->getHelper('ActiveNavigation');
                        $activeNav->setActiveNav($this->view);                  
        
                }


So if i have in the config file an "add item" page, this will correctly load
the add page and render the submenu. However, if there is an "edit item"
page (which is not defined in the navigation, but is displayed using the url
view helper in a table / list of items) the submenu will not render.

I suppose the navigation is only rendering the items and related submenus it
"knows" about - is there anyway i can add an edit page to the navigation
config, yet keep it hidden, or any other work around?

Thanks.


-- 
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Zend-Navigation-submenu-only-renders-if-link-is-defined-in-config-tp2222640p2222640.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to