We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45778
    • 75 Posts
    I'm trying to get this to work:

    [[Wayfinder? &startId=`0` &includeDocs=`99,748,443` &ignoreHidden=`1`]]

    But items 748 and 443 are in folders where the folder itself is hidden from menus, and Wayfinder refuses to go into those folders because the parents are hidden, so only doc 99 shows in the menu. I don't want the hidden parents of 748 or 443. I want to dig into those folders and find 748 and 443 and put them in my menu. Any suggestions?

    There was a similar thread over 3 years ago, and apparently Wayfinder hasn't been updated to allow this functionality yet. See https://forums.modx.com/thread/?thread=40611&page=1

    They suggest using Ditto (which isn't relevant to Revolution), but I'd much rather use Wayfinder because I'm relying on the way Wayfinder applies classes (here, self, first, last, etc.) to style the menu, and I'd lose that if I used getResources or some other method.

    This question has been answered by paulbohman. See the first response.

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You might check the pdoTools snippet pdoMenu. It has a lot of things that Wayfinder should have. I don't know if it does what you're asking for, though.
        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
        • 45778
        • 75 Posts
        Thanks for the suggestion. The &includeDocs function doesn't seem to work at all though, so it doesn't solve the problem. It does seem to be faster than Wayfinder, but it seems to be ignoring the MODx permission system, which I need it to obey, so that probably accounts for at least some of the speed. So it looks like it has promise, but it won't work for my circumstances.
          • 25803 ☆ A M B ☆
          • 721 Posts
          You could make weblink documents outside of that folder that point to the documents inside it and have Wayfinder parse the weblinks instead, which when clicked on in a menu, will go to your documents.
            • 45778
            • 75 Posts
            Thanks for the response. I did think of using weblinks, but that won't apply classes correctly. If I'm on a page that isn't the weblink id, Wayfinder won't apply the "here" and "self" classes. So the menu will show the pages correctly, but it won't style the items correctly.
            • discuss.answer
              • 45778
              • 75 Posts
              Ok. It turns out pdoMenu will work. The syntax is a little different from Wayfinder. It uses &resources instead of &includeDocs:

              [[pdoMenu? &parents=`0` &resources=`99,748,443` &ignoreHidden=`1`]]

              Thanks for the suggestions!