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

    I am trying to create 2 menus on the left column of my site and I have no idea how to implement the second one.

    Need a starting point at least.

    Thank You
      • 21496
      • 225 Posts
      You can duplicate your Wayfinder call and configure it for the second menu.
        René
        • 5340
        • 1,624 Posts
        [[Wayfinder? &startId=`0` &level=`1` &excludeDocs=`6,48`]]

        [[Wayfinder? &startId=`0` &level=`1` &includeDocs=`6,48`]]


        Isn’t there another way? This method is not to elegant.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          If you want two identical menus, you can set the output of a Wayfinder call to be a placeholder, then use that placeholder wherever you want the menus to appear.
          &ph name of a placeholder to set instead of directly retuning the output results
          So you would add this to your Wayfinder snippet call (it won’t put anything where it’s called):
          &ph=`leftmenu`

          then put this in your HTML where you want the menu:
          [+leftmenu+]
            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
            • 21496
            • 225 Posts
            Quote from: xpix at Nov 04, 2007, 03:00 AM

            [[Wayfinder? &startId=`0` &level=`1` &excludeDocs=`6,48`]]

            [[Wayfinder? &startId=`0` &level=`1` &includeDocs=`6,48`]]

            Isn’t there another way? This method is not to elegant.
            Elegant or not, it’s the method that works if you want to have two different menus and use Wayfinder for this, and personally, it’s not violating my sense for aesthetics.

            But maybe there is a more elegant solution, if we have more details about what you want to achieve.
              René
              • 5340
              • 1,624 Posts
              I am just referring to the fact that if I add a new menu item in the second menu I will have to modify the parameters

              hmm... grin

              Or you can make something like this:

              for the first menu set ids from 0 to 99 and for the second from 100 to whatever

              [[Wayfinder? &startId=`0` &level=`1` &limit=`99`]]

              [[Wayfinder? &startId=`100` &level=`1` ]]
                • 21496
                • 225 Posts
                Maybe you can solve that by creating two folders, one for the docs 1 - 100, the other for the docs > 100. That way, you can reference the folder in your wayfinder call, and everything that is added to the > 100 folder is displayed in the menu automatically.
                  René
                  • 5340
                  • 1,624 Posts
                  cool

                  Thx
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    Yes, that Tree structure really serves no other purpose than to organize your menus. And if it really gets complicated, you can use TVs and use Ditto with a simple display template as a filtered menu.
                      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