Panda_Of_Apocalypse
Panda_Of_Apocalypse

Reputation: 100

How can I hightlight the correct menu when a subpage is selected

There is my website structure

Main menu

Home [/] / Products[/products] / Contact Us [/contact-us]

Products submenu

Product1 [/products/product1]
Product2 [/products/product2]

When I'm on product1 or product2 page, I want the product menu to be highlighted.

Does anyone have a simple idea about how I could do that without javascript?


Problem resolved!

Thanks to Piotr, I realized that my approach to fix the problem was wrong and that I simply had to work toward making native navigation work.

I had a problem with the navigation query links since my website was multilingual but I just had to add a localization part to query link content items to fix the problem and have working native submenus.

Upvotes: 1

Views: 155

Answers (2)

Praggie
Praggie

Reputation: 396

there is a module for this in gallery also. http://gallery.orchardproject.net/List/Modules/Orchard.Module.dsendelb.Navigation

Upvotes: 0

Piotr Szmyd
Piotr Szmyd

Reputation: 13366

Assuming you're using the default navigation, all items on the selection path (from current one up to the root) should have a CSS class 'current' applied. Just apply some CSS styling to this class and you're set.

Upvotes: 1

Related Questions