Hi
Working on my first modx job. It’s all going fine apart from the navigation. I’m trying to figure out how to have the menus display a highlight depending on the page that is displayed.
I’ve got a horizontal wayfinder main menu. When viewing the homepage I want the ’Home’ link to have a different background image. About page ’About’ link etc. How do I apply a class to the menu dynamically.
Also I’ve got a couple of sub menus within the site. These are just simple links in a chunk that you select in a template variable. How could I assign a class to these dynamically to have the menu highlight again to the page it’s displaying.
Thanks in advance.
I finally noticed that Wayfinder generates class="active" so I just used that in the end.
I made a second Wayfinder call which pulled in just the children for the side menu.