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

    I am sure this has been covered a number of times, but I did some searching and couldn’t pinpoint how the question would have been asked. I also wanted to ask it from a content managers perspective also.

    The wayfinder snippet will generate a menu based on the document hierarchy. If I have a document that I want to appear in more than one menu, what is the best way to go about it?

    I figure I could add a TV or two to each page that defines the menu that they should belong to, and then rework wayfinder to use the new TV rather than the document ID (such as the page categorisation post that is often referred to), but I suspect that there are simpler approaches.

    For one thing, doing it this way means that you have a document hierarchy that wouldn’t mirror the menu hierarchy. You could use wayfinder for most cases, then use a special case for those pages that need to be in more than one menu.

    Seems clumsy though, and hard to describe to the person who would ultimately manage the site - the content manager.

    Any suggestions?
      • 10449
      • 956 Posts
      You could use Ditto-filters or phx. I guess you could even use Wayfinder + weblinks (use a special weblink CSS class to show or hide those links in your WF-template chunks).
      http://ditto.modxcms.com/tutorials/basic_filtering.html
      http://wiki.modxcms.com/index.php/PHx


      For "manual" selections (inclusion or exclusion) you can use Wayfinder + the includeDocs or excludeDocs parameter with a comma-delimited list of doc ids.
      http://www.muddydogpaws.com/development/wayfinder/parameters.html