We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53283
    • 14 Posts
    I am building a navigation for my site and I am using the &where parameter to include specific resources. But it only displays the top level menu items NOT the dropdowns. How can I include the dropdowns?
    This is my Wayfinder call:
      [[Wayfinder?
              &startId=`0`
              &outerClass=`navigation__nav__list`
              &innerClass=`navigation__nav__submenu`
              &rowTpl=`navigationRows`
              &rowIdPrefix=`nav__item`
              &level=`3`
              &where=`[{"id:IN": [8, 11, 12, 10, 18, 19, 20, 21]}]`
            ]]

      • 38783
      • 571 Posts
      Can you show the code for your &rowTpl=`navigationRows`?

      If your &where is just selecting a list of resources by their id number then it might be simpler to use &includeDocs instead
        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

        email: [email protected] | website: https://andytough.com
        • 53283
        • 14 Posts
        Thanks for your reply, Andy.

        What I trying to do is display certain resources in my top navigation (including their child pages, as dropdowns on hover) but exclude other pages in this top menu. I would like to do it without using resources IDs if possible, so that when an admin adds a page it is automatically added to the top menu without me having to update the call with an ID.

        Hope this makes sense.

          • 53283
          • 14 Posts

          I am unable to post any code unfortunately. It errors sad
            • 38783
            • 571 Posts
            If I understand what you are trying to do then could you achieve it by just using 'hide from menus' on the top level items you want to exclude.
              If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

              email: [email protected] | website: https://andytough.com
              • 53283
              • 14 Posts
              Yes I thought of that but I also have a navigation in the footer area, so if I use 'hide from menus' then the navigation items are hidden there too- which is not what I want.
                • 53283
                • 14 Posts
                This is my top menu if it helps to understand
                  • 38783
                  • 571 Posts
                  I don't know if this would be practical but in your footer Wayfinder call you could tell it to ignore the 'hide from menus' instruction.

                  &ignoreHidden=`1`


                  Setting this to 1 ignores the "Show in menu" checkbox for documents, and includes them in the menu anyway. The default is 0.

                  https://docs.modx.com/extras/revo/wayfinder


                  [ed. note: andytough last edited this post 6 years, 11 months ago.]
                    If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                    email: [email protected] | website: https://andytough.com