We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20836
    • 3 Posts
    Hope someone can help. And I’ve read the superb wayfinder documentation (thanks Kongondo) and had a good look around the forums but can’t see how to do the following.

    First I have a wayfinder call for my horizontal menu at the top which gives me a drop line menu for the top and second level of my horizontal menu (so far so good):-

    1) Top level - home , products , contact , etc
    I
    2) Second Level - product category 1 , product category 2 , product category 3 , etc

    if you click into the third level ie an individual product how can you display a menu with just the products at the same level you are on ie in that category alone? I want to create a vertical menu using wayfinder just showing the page I am on and its siblings so when you are browsing a product you can view all the products within the same category

    eg
    3) 3rd level
    product 1
    product 2
    product 3
    etc

    I can see you can make a call using &StartId=`x` where you specify x as the individual product category in the level above, however that would mean I then have to create a separate call for each product category. Is there a way for wayfinder to id the immediate parent of the page I am on and then just show the children of that parent (my siblings), so I am on a product page and the vertical menu shows the other products in the same category.

    Hope that makes sense

    Any help greatly appreciated

    Cheers
      • 26931
      • 2,314 Posts
      Hi n8tive,

      Is there a way for wayfinder to id the immediate parent of the page I am on and then just show the children of that parent (my siblings)
      try
      startId=`[*parent*]`
        • 20836
        • 3 Posts
        Huge thanks sharkbait,

        I really thought I’d tried that but my syntax must have been wrong.

        You’re a star

          • 16415
          • 2 Posts
          Hi n8tive,

          Can you post the code for the three Wayfinder calls to get the three level menu?
          i want to build an horitzonal menu and another submenu below. Then a third vertical menu that depends on the submenu.

          I’d appreciate it!

          thanx!!
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            That would just be a regular "dropline" menu, with the third level being a dropdown off of the lower level of the dropline. It’s all in the CSS.
              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
              • 16415
              • 2 Posts
              Quote from: sottwell at Sep 07, 2010, 12:36 AM

              That would just be a regular "dropline" menu, with the third level being a dropdown off of the lower level of the dropline. It’s all in the CSS.

              Thank your for your reply,

              I’m not using any CSS for the example, I just want to see the result I want with plain lists without style and when I see it works like I want I’ll start with the styling.

              Please check this code:

              <!--First Level Nav: -->
              [[Wayfinder? &startId=`0` &level=`1`]]
              
              <hr>
              <!--Second Level Nav: -->
              [[Wayfinder? &level=`1` &startId=`[[UltimateParent]]` ]]</div>
              
              <hr>
              <!-- Third Level Nav:-->
              [[Wayfinder? &startId=`[*parent*]` &level=`1`]]
              


              It’s working for the two first levels but not for the third. It doesn’t react when you select the items of the second level list. So the third list looks always the same and doesn’t change when I click in one of the options in the second level.

              I think this must be a pretty normal navigation scenario what I want to do. But I just don’t figure out how to do it.

              Some help will be much appreciated!
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                It’s done with one Wayfinder call and CSS. Wayfinder will generate a nested unordered list, and your CSS positions each level.
                  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
                  • 22427
                  • 793 Posts
                  My answer is coming late - didn’t see the thread before. Hopefully you already found a solution.
                  Anyway, my 2 cents:
                  So the third list looks always the same and doesn’t change when I click in one of the options in the second level.
                  [tt][*parent*][/tt] is referring to the parent of the page where the Wayfinder call is in - so it is always the same.
                  You should again use UltimateParent. Maybe like that:
                  [!Wayfinder? &level=`1` &startId=`[[UltimateParent? &topLevel=`2`]]`!]
                  (I didn’t check it by myself, play around with the value of &topLevel.)

                  By the way, call Wayfinder uncached ( that is [tt][!...!][/tt] and not [tt][[...]][/tt] ) - in Evo nested snippet calls have to be alternating uncached and cached. For an explanation look here:
                  http://sottwell.com/how-snippets-work.html (Thanks, Susan!)