We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37042
    • 384 Posts
    When you use the &includedocs parameter within a drop down menu, it kills the drop downs. Is there a way around this? Here's a more detailed explanation.


    Typically, a drop down menu with WayFinder looks like this:

    [[Wayfinder? 
    &startId=`0`
    &level=`3` 
    &config=`cssplay-dropdown.config` 
    &rowClass=`topnav`
    ]]
    

    Result = Drop down menu works and displays all the resources and their children.

    But if you only want to display certain resources and their sub-children, you would normally add the following
    &includedocs=`1,2,4,6,10`

    Result = This stop the drop downs from working sad

    At the moment, I am getting around this toggling the Hide From Menus checkbox.
    But this isn't a satisfactory solution as it hides that Resource from other menus where you may want to display the page as a link.

    I could also use the &excludedocs parameter but on a large site with clients creating pages, they don't always remember to update the navigation chunk.
      ...
    • Your best bet is to select Hide from menus in each Resource you do not want displayed in the dropdowns. For whatever reason, I understand the includeDocs to be exclusive to the rest of the site. If memory serves, I think I used to keep it in my head as showOnlyDocs.

      You can still create links to the resources using their id (href="[[~27]]")where necessary, or Wayfinder's &ignoreHidden.
        Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

        Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com