Hello

i have an xml config file that defines the navigational elements to be
created using zend_navigation.

This has worked fine up until now, where i need to add a submenu to the
submenu, so the submenu is two levels deep.

Currently, it will only render the first submenu level.

Xml section in question:
<vacancies>
                        <label>Vacancies</label>
                        <uri>/vacancies</uri>
                        <controller>vacancy</controller>
                        <action>index</action>
                        <resource>resource.vacancy</resource>                   
                        <pages>
                                <add>
                                        <label>Add New Vacancy</label>
                                        <uri>/vacancy/add</uri>
                                        <controller>vacancy</controller>
                                        <action>add</action>    
                                </add>
                                <applications>
                                        <label>Applications</label>
                                        <uri>/applications</uri>
                                        <controller>application</controller>
                                        <action>index</action>
                                        <pages>
                                                <category>
                                                        <label>Add 
Category</label>
                                                        
<uri>/application/add-category</uri>
                                                        
<controller>application</controller>
                                                        
<action>add-category</action>
                                                </category>
                                                <requirement>
                                                        <label>Add 
Requirement</label>
                                                        
<uri>/application/add-requirement</uri>
                                                        
<controller>application</controller>
                                                        
<action>add-requirement</action>                                                
                                                </requirement>
                                        </pages>
                                </applications>
                        </pages>
                </vacancies>

So the first block, vacancies is rendered as part of the main menu, and no
children are rendered, which is good. Then for the submenu, the only child
menu items rendered are the first two pages, add and applications - none of
applications child pages are being rendered.

The code i have in my layout:
echo $this->navigation()->menu()->renderSubMenu();

(note, have also tried:)
$rootPage = $this->navigation()->getContainer()->getPages();
                        foreach($rootPage as $page) { 
                                if($page->isActive(true)) { 
                                        echo 
$this->navigation()->menu()->renderMenu($page, array('ulClass' =>
'submenu'));                            
                                }
                        }

Is the submenu method not recursive? Any hints appreciated.
-- 
View this message in context: 
http://n4.nabble.com/Rendering-nested-submenu-items-from-XML-file-tp1753813p1753813.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to