We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22835
    • 54 Posts
    I have a nav thats working well for me. Now I want to add a second level. I've followed all the tutorials and have been very careful to setup all specific correct parts;

    set level
    set innerTpl
    set hideSubmenus to false

    but still wayfinder wont output my second level of my nav! grr... I've tried everything doesn anyone know what i might have missed?

    I'm starting to wonder is it some kind of cache thing???

    Any help would be appreciated.


    website: http://www.hoopperu.org

    Here is the wayfinder snippet with the calls
    [[ !Wayfinder?
    &startId=`0`
    &rowTpl=`navrow`
    &outerTpl=`mainnav`
    &innerTpl=`subnav-ul`
    &level=`2`
    &hideSubMenus=`FALSE`
    &hereClass =`active`
    &rowIdPrefix=`item`
    ]]
    
      • 10208 ☆ A M B ☆
      • 1,780 Posts
      Set &level to `0`, it'll show all submenus. If you only want to show the second level, and hide the third level (assuming there is a third level) then set the &level with a positive number. If there are no third level resources, `0` will work fine. You don't need the &hideSubmenus parameter.

      Wayfinder is a little picky about levels however, depending on what level you're actually on and due to the fact that the "web" context is actually level 1. So, if &level=`2` doesn't show submenus, try `3` or `4`, depending on what level the snippet is being called on. IME, it's typically one number higher than I think it is.

        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 22427
        • 793 Posts
        There is another stumbling block. You have to set
        &hideSubMenus=`0`
        because 0 is the only value which will be interpreted as false. Any other value is treated as true!
        So the information in some documentation, saying the possible values were `TRUE` and `FALSE` are wrong!
        Cf. this thread: https://forums.modx.com/thread/40806/ and this issue in the bug tracker:
        https://github.com/splittingred/Wayfinder/issues/29 [ed. note: ottogal last edited this post 13 years, 11 months ago.]
          • 22835
          • 54 Posts
          so I've amended the snippet calls to the following... (level is 0 and sub-menues hide taken out)
          [[ !Wayfinder?
          &startId=`0`
          &rowTpl=`navrow`
          &outerTpl=`mainnav`
          &innerTpl=`subnav-ul`
          &level=`0`
          &hereClass =`active`
          &rowIdPrefix=`item`
          ]]
          

          but my sub level items are still not appearing.

          NB I haven't set any pages to hide from menu and all pages are published and connected to the right template.
            • 10208 ☆ A M B ☆
            • 1,780 Posts
            Set &level to the depth you need. Include web as level 1 when you count the depth.

            And remove the spaces just after the first double bracket.
              Frogabog- MODX Websites in Portland Oregon
              "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
              Having server issues? These guys have MODX Hosting perfected - SkyToaster
              • 22835
              • 54 Posts
              tried those 2 fixes but nothing gives sad
              [[!Wayfinder?
              &startId=`0`
              &rowTpl=`navrow`
              &outerTpl=`mainnav`
              &innerTpl=`subnav-ul`
              &level=`3`
              &hereClass =`active`
              &rowIdPrefix=`item`
              ]]
              
                • 22835
                • 54 Posts
                i've also tried different levels
                  • 22427
                  • 793 Posts
                  May be we could help you better if we knew your chunks "navrow", "mainnav" and "subnav-ul".
                  Most likely you forgot to include [[+wf.wrapper]] in one of them.
                    • 22427
                    • 793 Posts
                    @Frogabog:

                    Wayfinder is a little picky about levels however, depending on what level you're actually on and due to the fact that the "web" context is actually level 1.
                    What you say here about the &level property of Wayfinder is true for the &topLevel property of the UltimateParent snippet.
                    For Wayfinder, &level=`1` means: Only one level of the menu will be displayed - the immediate children of the resource determined by &startId - which may be located deep down in the tree. There is no relation with the root of the tree.
                      • 22835
                      • 54 Posts
                      Here are my 3 chunks;

                      mainnav

                      <ul id="mainnav"[[+wf.classes]]>[[+wf.wrapper]]</ul>


                      navrow

                      <li [[+wf.id]]><a href="[[+wf.link]]"  [[+wf.classes]] title="[[+wf.title]]"> [[+wf.linktext]] </a></li>


                      subnav-ul
                      <ul  [[+wf.classes]] class="seclvl">[[+wf.wrapper]]</ul>


                      maybe my issues are coming in subnav-ul