We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12379
    • 460 Posts
    The web site template I’m developing has the top level menu items in a horizontal bar across the top of the page:
    eg Home | About | Links | Contact

    using...

    [!Wayfinder?startId='0' &hideSubMenus='1'!]


    ...so the submenus won’t display.

    I do however want to display the submenus in a vertical bar on the left for each top level page as it’s displayed.

    For example when the ’About’ page displays only it’s submenus are displayed down the left

    eg
    Background
    Sponsors
    Events


    How would I do this using Wayfinder? I’d also like the option of displaying two levels of submenus.

    Background
    xyxy xyxyxy
    Sponsors
    xyx xyxyx xy
    Events
    Xyx xyxyxy

      Mostly harmless.
      • 8461
      • 205 Posts
      If your top level links such as about us are containers then you could simply set level limit to `1` so pages within those folders are exluded (&level=`1` )

      then in your template in your left block you could then add [!Wayfinder?startId=`[[Parent]]`!] which will only display those pages inside the parent folder. So if you were in About Us section, only the pages inside that section etc would eb displayed

      This post may be useful also http://modxcms.com/forums/index.php/topic,12920.msg86337.html
        • 12379
        • 460 Posts
        Thanks Edge but still couldn’t crack it using your suggestions.

        All top level links are containers.

        Top level navbar is set to: [!Wayfinder?startId=’0’ &level=’1’!]
        (appears to be displaying all menu levels instead of just top level)

        Sidebar is set to: [!Wayfinder?startId=’[[Parent]]’!]
        (appears to be displaying all menu levels instead of just pages within container)

        Is there anything other setting that could be wrong?
          Mostly harmless.
          • 10487 MODX Staff
          • 1,535 Posts
          Are you using backticks (`) for surrounding the snippet parameter values? You’ll need to use them else you’ll have problems for sure, single quotes won’t work.

          Also, you’ll need to use [*parent*] and not [[Parent]].

          Examples:
          [!Wayfinder?startId=`0` &level=`1`!]
          [!Wayfinder?startId=`[*parent*]`!]
          

          Hope that helps,
          Garry
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 12379
            • 460 Posts
            Thanks, that’s fixed the top level menu from display all submenus, however the side bar still displays all levels with [!Wayfinder?startId=`[*parent*]`!] . I’ve checked all top level links and they’re definitely all containers....
              Mostly harmless.
              • 12379
              • 460 Posts
              The correct solution I’ve discovered is:

              [!Wayfinder?startId=`[[UltimateParent]]`!]
                Mostly harmless.
                • 5002
                • 6 Posts
                I have a question in the same venue.

                I’ve been having troubles setting up a navigation bar. Only two out of four top navigation links are "parents." When a user clicks on those two out of four links I wanted the page to show the "children" pages with Wayfinder, but I cannot figure out how to do it. Any suggestions?

                Thanks for your help.