Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 something like the above. I need to add a class for the ul tag generated after the Accounts label. Something like the following doesn't work:

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

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

like image 872
gihan Avatar asked Dec 12 '10 03:12

gihan


1 Answers

Just add the class element to your xml navigation file like this

<home>
    <label>Home</label>
    <controller>dashboard</controller>
    <action>index</action>
    <class>home</class>
</home>
like image 139
UpCat Avatar answered Nov 07 '22 13:11

UpCat