Portal Engine
Version 3.x > Portal Engine2 CSS List Menus, 2 Hierarchy Levels, 1 Page View modes: 
User avatar
Member
Member
Cogeian - 3/3/2009 6:11:05 PM
   
2 CSS List Menus, 2 Hierarchy Levels, 1 Page
Hello all. We're trying to configure the navigation on a client's Kentico site in a very particular way, and we really don't want to have to forgo the built-in navigation components in favor of custom nav. Perhaps you can help steer us toward a configuration that will help.

On our page template we have two web part zones - one for primary nav, one for local nav. They are right next to each other, main nav on the left and local nav on the right.

In the primary nav, we have a CSS List Menu control. We're using CSS to hide the second-level items, so that only the top-level nav items appear. So far so good.

In the local nav, we want to place another CSS List Menu control, and set that to display only the 2nd level nav items for the currently-selected top-level nav item.

Let me provide a visual example.

Given this site map:

- Home
- About Us
- - History
- - Staff
- - Mission
- Contact Us
- - Driving Directions
- - Mailing Address
- Membership
- - Benefits
- - How to Join
- - Publications

If you were on any child page of About Us, the main nav should display:
- Home
- About Us
- Contact Us
- Membership

while the local nav should display:
- - History
- - Staff
- - Mission

If you were on any child page of Membership, the main nav should display:
- Home
- About Us
- Contact Us
- Membership

while the local nav should display:
- - Benefits
- - How to Join
- - Publications

And so on. The top-level nav always shows all of its items, while the local nav needs to display only of the pages that are at the same hierarchical level and within the same node as whatever page you're currently on.

We've tried playing with the maximum nesting, but that doesn't do it. It seems like what we really need is to be able to set a *minimum* nesting level, or at least hard-wire it to only show second-level nav items.

Does that make sense?

Suggestions are welcome. We're new to Kentico and although we've figured out most of it, this piece of configuration eludes us.

User avatar
Member
Member
christopherhawkins-gmail - 3/3/2009 6:25:56 PM
   
RE:2 CSS List Menus, 2 Hierarchy Levels, 1 Page
Follow-up:

We've also tried setting the local nav's WHERE clause to NodeLevel = 2, but that's doesn't get us all the way there. We also need to be able to specify the Parent node ID, and we're not sure how to get that value into the where clause.

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 3/9/2009 6:13:53 AM
   
RE:2 CSS List Menus, 2 Hierarchy Levels, 1 Page
Hello,

You can use following setting for the first menu:
Path: /%
Maximum nesting level: 1

And following settings for the second menu:
Path: /{0}/%
Maximum nesting level: 2

Please see http://www.kentico.com/docs/devguide/appendix_b___path_expressions.htm for more details about path expressions.

Best Regards,

Martin Dobsicek