Developer forum

Forum » Templates » Two leveled recursive navigation plus separate third level

Two leveled recursive navigation plus separate third level


Reply
I'm working on a site that has two levels on it's main navigations. Level two is not visible until you hover over the first menu items, then it drops down using a jQuery slideDown effect.

The menus will look something like this: http://cld.ly/8017la

Let's say the menu items is like the following:

1. Home
2. News
    2.1 Latest news
    2.2 Archives
3. About
    3.1 Our company
         3.1.1 History
         3.1.2 Philosophy
4. Presence
    4.1 Production
    4.2 Procurement

All level two items would be recursive, like this:

<ul>
    <li>Home</li>
    <li>
        News
        <ul>
            <li>Latest News</li>
            <li>Archives</li>
        </ul>
    </li>
    <li>
        About
        <ul>
            <li>
                Our company
                <ul>
                    <li>History</li>
                    <li>Philosophy</li>
                </ul>
            </li>
       </ul>
    </li>
    <li>
        Presence
        <ul>
            <li>Production</li>
            <li>Procurement</li>
        </ul>
    </li>
</ul>

You get the idea. The thing is, that I only want the third menu level to be visible, when you're on its parent page. The "History" and "Philosophy" will only be visible when I am on the "Our company" page.

Not just that, but I want the third menu level to be a separate menu, outside the main navigation menu.

Is this possible to do with XSLT? Or do I need to create and extra menu for the separate third menu level setup?

Replies

 
Reply
Hi

I would register 2 navigations on the page template.
One (mainnav) with level 1 and 2 and another (subnav) with level 3 only.

For mainnav you can use the attached XSLT which works great with Superfish and jQuery.  For subnav just use the liclean.xslt

// Dammark

 

You must be logged in to post in the forum