Zend navigation with XML file

<configdata> <home> <label>Home</label> <controller>dashboard</controller> <action>index</action> </home> <accounts> <label>Accounts</label> <controller>accounts</controller> <action>index</action> <pages> <sales> <label>Sales Accounts</label> <controller>sale</controller> <action>index</action> </sales> <purchase> <label>Purchase Accounts</label> <controller>purchase</controller> <action>index</action> </purchase> </pages> </accounts> </configdata> 

I have code similar to above. I need to add a class for the ul tag generated after the Accounts label. Something like the following does not work:

 <pages class="sub"> <sales> ........ </sales> </pages> 

My goal is to have a mega menu for navigation. To add functionality to it, I need to have classes in the generated menu code.

+6
javascript jquery zend-framework zend-navigation
source share
1 answer

Just add a class element to your xml navigation file, like this

 <home> <label>Home</label> <controller>dashboard</controller> <action>index</action> <class>home</class> </home> 
+3
source share

All Articles