We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7252
    • 2 Posts
    hi,
    may i ask a somewhat related question.. i’ve added &hereClass=`active` to Wayfinder so the current <li> looks different, but is there a way to remove the url for the currently active menu item, so it doesnt link to itself?
      • 25663 MODX Staff
      • 12,272 Posts
      &hereTpl
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 7252
        • 2 Posts
        thanks for the tip, i’ve added &hereTpl=`myhereTpl` to the Wayfinder call:

        [!Wayfinder?startId=`0` &hereClass=`active` &hereTpl=`myhereTpl` &selfClass=`current` &outerClass=`sidemenu`!]

        then created a chunk named myhereTpl:

        <li class="active">[+wf.linktext+]</li>
          • 25663 MODX Staff
          • 12,272 Posts
          Good job. smiley

          http://wiki.modxcms.com/index.php/Wayfinder is my most visited page of the wiki and contains boatloads of good info on things wf can do.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 10449
            • 956 Posts
            Plus, there’s always the excellent pages at MuddyDogPaws, with lots of explanations + examples:
            http://www.muddydogpaws.com/development/wayfinder/parameters.html
            http://www.muddydogpaws.com/development/wayfinder/examples.html
              • 32699 ☆ A M B ☆
              • 427 Posts
              I probably have more experience than anyone using modx, and I am not adverse to:


              • Going to the demo site
              • Looking through his multiple examples
              • Finding one I like
              • Create all the chucks in my site
              • Reading the page source to get css path and name for his menu
              • Grab the css he uses to make the drop down work the way it appears
              • Put it all on my site and play with a working version of it
              • [li]

              This is so much better than spending half a day only to find out I was WAY OVER THINKING it. shocked

              As a general rule of thumb, I have discovered two things with ModX

              • The core items such as ditto and wayfinder have lots of documentation and it takes to long to "discover" the solution you are looking for.
              • When I get the answer, I find it was way to easy and I should have known it already.

                Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

                Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com
                • 27708 MODX Staff
                • 2,502 Posts
                Wayfinder is a very powerful snippet. I found it initially to be a challenge. One must drop the programmer when learning how to use snippets. It is about getting the snippet to do what you want (if it is possible). One of the biggest "Doh!" moments came when I realized that all snippets were called exactly the same way. Learning the MODx syntax is one of the biggest hurdles in the process to becoming adept at working quickly.

                What I will say learning Wayfinder was that the examples were all using CSSPlay dropdowns which for 90% of the work I do are overkill. It is nice just to generate a unordered list with an active link and a parent class. This is probably the most common menu style there is so trying to figure it out based on the cssplay based examples meant having to disregard lots of the docs and figure it out on my own BUT that really allowed me to understand how to do it. Now I can build Wayfinder menus be it main navigation or a sitemap in my sleep.

                As far as documentation is concerned. I used to have the attitude that the devs should write all the documentation but it is actually better for others to contribute as this can lead to better explanations and more thorough documentation that doesn’t assume a base understanding. In addition, programmers are not always able to step far enough out of their application (or snippet) to explain it fully.

                Jay
                  Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
                  • 7231
                  • 4,205 Posts
                  I used to have the attitude that the devs should write all the documentation but it is actually better for others to contribute as this can lead to better explanations and more thorough documentation that doesn’t assume a base understanding. In addition, programmers are not always able to step far enough out of their application (or snippet) to explain it fully
                  Well said. Usually developers will document for developers rather than the non-tech user which will require more documentation anyway. It is a rare case when a developer can document for the end user.

                  I found that wayfinder made sense once I found muddydogpaws site. Once I could read what all the parameters did as well as see the examples of the templates it all made sense. figuring out how to use the building blocks makes a huge difference.

                  One must drop the programmer when learning how to use snippets.
                  Great advise.
                    [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                    Something is happening here, but you don&#39;t know what it is.
                    Do you, Mr. Jones? - [bob dylan]