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

    I have problems using wayfinder. I would like to set up horisontal main menu (first level) and have subsequent levels appear as veritcal menu, but only the second level.

    What confuses me is that when I navigate to the third level document, my vertical navigation dissapears.

    I am new to MODx and snippets usage is confuzing to me. Please help..

      www.ri-mo.org
      • 7231
      • 4,205 Posts
      What confuses me is that when I navigate to the third level document, my vertical navigation dissapears.
      What is causing this is that once in the third level it wants to build the menu relative to that document (which used to be a second level doc). Maybe use a snippet like UltimateParent to set the &startid which returns the ID of the parent as related to the root doc.

      for example, this call will set the start ID relative to the doc you are in starting 2 levels deep from the root (root is level 1 so 2 will be the first sub level):
      [!Wayfinder? &startId=`[[UltimateParent? &topLevel=`2`]]` !]


      Note: notice that the embedded snippet call is chached [[ ]] and the outer one is not cached [! !], this is important for proper operation.
        [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't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 6584
        • 37 Posts
        Note: notice that the embedded snippet call is chached [[ ]] and the outer one is not cached [! !], this is important for proper operation.

        Thanks. [! [[ ]] !] sintax is what I was missing.

        There is one detail though.. How do I make a.active apply to the vertical navigation (it somehow applies to Breadcrumbs, but not to Wayfinder..)

        MODx comunity is really fast!
          www.ri-mo.org
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          View the source of your web page to see what classes are being applied to the various parts of the menu structure, and either add parameters to the Wayfinder call or adjust your CSS to apply to the defaults.
            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
            • 7231
            • 4,205 Posts
            Sottwell’s recomendation is a good one. If it is happening in the breadcrumbs and not in the menu it has to do with the css and the page structure. You need to identify the specific wayfinder outpu by either a class or a unique ID then specify this in the css.

            Most likely you need to be more specific in your css: instead of ’a.active’, which is generic, try something like ’#navIdName ul li a.active’, where navIdName is the name of your navigation div.
              [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't know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 6584
              • 37 Posts
              Most likely you need to be more specific in your css: instead of ’a.active’, which is generic, try something like ’#navIdName ul li a.active’, where navIdName is the name of your navigation div.

              Doesn’t work. Is there a way to make wayfinder display active page in menu as non link?
                www.ri-mo.org
                • 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
                  • 6584
                  • 37 Posts
                  As I said, I am not so acustomed to snippet sintax. How do I apply &hereTpl ?
                    www.ri-mo.org
                    • 25663 MODX Staff
                    • 12,272 Posts
                    &hereTpl=`tpl chunk name here`

                    The "here template" would then have the markup for whatever you wanted it to look like. More info on the wiki: http://wiki.modxcms.com/index.php/Wayfinder (coincidentally, my most visited wiki page by a longshot)
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 6584
                      • 37 Posts
                      Been there before, but didn’t notice the http://www.muddydogpaws.com link.
                      Hope I will not have to bother you with beginners questions (about wayfinder).
                      Thanks!
                        www.ri-mo.org