We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30585
    • 833 Posts
    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
      • 16183
      • 1,390 Posts
      So you are not using Wayfinder for this?

      /k
        • 30585
        • 833 Posts
        Quote from: kongondo at Jun 25, 2009, 06:42 PM

        So you are not using Wayfinder for this?

        /k

        No I’m not. Never had, is there a way around it?
          A MODx Fanatic
          • 28042 ☆ 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?
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 30585
            • 833 Posts
            Quote from: sottwell at Jun 25, 2009, 08:21 PM

            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?

            Sold! I will opt for wayfinder.

            Thanks
              A MODx Fanatic