We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41708
    • 6 Posts
    Hello. I'm hoping some kind soul will take pity and help this noob out ! smiley

    I am re-doing my website, using Wayfinder for the menu system. This is the temporary site: http://inessencecounselling.com/index.php?id=4

    It works perfectly for the page mentioned above, and it's child (or sub menu) pages.

    The problem is that when I click on a different parent link e.g. the "Menu 3", the sub-menus disappear for the "Menu 2" link. e.g. hover your mouse over the "Menu 2" and nothing appears.

    It is my understanding, from reading all 148 pages of the "wayfinder book.pdf" bible, twice, that sub menus should display, unless I use the &hideSubMenus=`TRUE` parameter.

    My Wayfinder call:
    [[Wayfinder? &startId=`0` &outerTpl=`menuContainer` &outerClass=`primary-menu primary menu-no-mobile clearfix` &rowTpl=`menuRows` &rowClass=`menu-item` &innerTpl=`innerContainer` &innerClass=`sub-menu` &innerRowTpl=`submenuRows` &titleOfLinks=`longtitle` &textOfLinks=`menutitle` &level=`3` &hideSubMenus=`FALSE` &hereClass=`current_page_item` &lastClass=`` &innerHereTpl=`innermenuheretpl`]] 


    Looking at the source code for the "Menu 3" page (http://inessencecounselling.com/index.php?id=3), it is clear that Wayfinder is not outputting the sub menus at all (e.g. ignoring the &innerTpl/&innerClass/&innerHereTpl templates entirely).

    Am I completely wrong in assuming that Wayfinder SHOULD be outputting the sub menus?


    For reference here are all the Chunks I used:

    {{menuContainer}}
    <ul[+wf.classes+]>[+wf.wrapper+]</ul>
    


    {{menuRows}}
    <li [+wf.id+] [+wf.classes+] >
    <a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+]</a> 
    [+wf.wrapper+]</li>


    {{innerContainer}}
    <ul [+wf.classes+]>[+wf.wrapper+]</ul>


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


    {{innermenuheretpl}}
    <li class="menu-item">
    <a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>
    [+wf.wrapper+]</li>


    Can somebody please help me debug this issue?

    Thanks a million!
    Alexander

    This question has been answered by sottwell. See the first response.

    [ed. note: alamm99 last edited this post 14 years ago.]
      • 10208 ☆ A M B ☆
      • 1,780 Posts
      Set your &level parameter to the number of levels down from "Web" that they exist on. Count Web as level 1.

      So, if your submenus are on the third level, set &level=`3` in the Wayfinder call. Since Wayfinder determines the levels from the page it's being output on, if your level is set to 2 on a 3rd level page, you won't get your submenus.

        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
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        It's helpful if you put your code inside code tags (the < > button in the editor toolbar) when posting.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 41708
          • 6 Posts
          Hi - I have the &level='3' in my wayfinder code already...which was hard for you to see since my wayfinder call wasn't displaying in my post smiley

          I've attached my wayfinder call so that you can see what I've done.
            • 10208 ☆ A M B ☆
            • 1,780 Posts
            Just highlight the code, and then click the <> button above. It'll display in the post itself.
              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
              • 41708
              • 6 Posts
              thanks for that tip! I've updated all the code in my original post.
              • discuss.answer
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Try
                &hideSubMenus=`0`

                instead of `FALSE`. Actually you can omit it altogether, as the default is false.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 41708
                  • 6 Posts
                  Removing it altogether, OR, using &hideSubMenus=`0` worked! THANK YOU!

                  ...it is a bit odd that the default &hideSubMenus=`FALSE` doesn't work though, as this is the default values. Maybe it's been updated in Wayfinder since the "wayfinder book.pdf" by Kongondo was written?

                  In any case, thanks for your help.
                  Alexander

                    • 10208 ☆ A M B ☆
                    • 1,780 Posts
                    That was written for Evolution, and while it still pertains and is useful, MODX is designed for 0 and 1 for false and true, respectively.

                    I think it was Opengeek who actually posted about this very thing this morning.
                      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