Hi guys,
I’ve created a class (.current) for active links to help the user know where they are on the site.
How do I tell the browser to activate that class for a certain link when it’s url is being browsed?
I guess what I’m trying to achieve is similar to what’s being used on the MODx site. When you’re viewing the download page for example, the download menu is active. I hope I’m making some sense.
Any help please?
A MODx Fanatic
So you are not using Wayfinder for this?
/k
-
☆ A M B ☆
- 24,524 Posts
Wayfinder dynamically assigns classes so that the current page will have the "here" class. That’s what Wayfinder is for. Call the snippet once and it will generate the appropriate menu for every page, no matter how many you have. Do you really want to have to go and edit all of your menus every time you add or remove a page?