We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13037
    • 36 Posts
    Hi,

    Fairly new to Modx.

    I have a template working in Modx and very happy so far with the CMS.

    However, I was wondering how easy it is to to highlight a part of my navigation, based on the page the user is on.

    So if he’s on Home, it would underline that hyperlink.

    Would there be a plugin for this, or is this something I’d have to do in PHP?


    Many thanks for any pointers,



    Michael
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If you are using Wayfinder, it automatically adds a classname to the "current" document and all of its parents. So you can just style it in your CSS. Take a look at a "view source" of your page to see how your menu is being generated.
        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
        • 13037
        • 36 Posts
        Many thanks.

        I have downloaded it. How do I install it on Modx?


        Thanks again for your prompt response.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          It comes with your MODx installation, unless you deliberately chose to not install it.
            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
            • 13037
            • 36 Posts
            Aaaah. I think I’ll just need to find a way to use it in my template now.
              • 4086
              • 7 Posts
              this is how you use it in your template:

              declare the desired property for elements assigned the explicit class, something like this:

              .current{
              text-decoration:underline
              }

              Quote from: sottwell at Apr 13, 2010, 06:00 AM

              it automatically adds a classname to the "current" document and all of its parents. So you can just style it in your CSS.
                • 13037
                • 36 Posts
                Aaah. Yep, that’s fine. I’m just unsure how to use it in the first place.

                How do I know it’s installed on the server?


                Thanks again for all your help.
                  • 13037
                  • 36 Posts
                  OK. It’s working out smiley

                  I’m using:

                  [[Wayfinder? &startId=`0` &showDescription=`1`]]

                  If I wanted to give a unique name to the unordered list, how would I do this?

                  Also, if I wanted to display only those with the Resource Parent ’53’, how do I do this? Using the level?

                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                      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
                      • 13037
                      • 36 Posts
                      Many thanks sotwell.

                      I’ve managed to get it working now.

                      <div id="subnav">
                      [[Wayfinder? &startId=`53` &showDescription=`1`&level=`0`]]
                      </div>