We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40024
    • 72 Posts
    Hello! I am a newbie, but i think that the issue i am currently having might be a little more complex for me to post it to the FAQ for newbies. Since i am still learning about modx, i took the chance of exploring the Wayfinder snippet since it creates menus. And now here is the problem: I have created a Wayfinder call in my template and i have created the necessary chunks.If i preview a resource i have specified to be my menu category(i have already placed in link attributes rel="category") it is as i have specified in my "catHeadings" chunk. BUT if i preview my Home page,then it is NOT. The menu category is unclickable(as i have specified) BUT the child resources are nowhere to be found!However,if i preview my menu category, then everything is ok. I read somewhere that there is a certain priority among tpls but "&categoryFoldersTpl" has greater priority than the "&outerTpl".I really can't figure it out. I apologize for my level of English in advance.
    Here is my Wayfinder call:

    [[Wayfinder?&startId=`0`&outerTpl=`menuContainer`&outerClass=`navigation`&rowTpl=`menuRows`&innerTpl=`innerContainer`&innerClass=`subnav`&innerRowTpl=`submenuRows`&hideSubMenus=`FALSE`&parentRowTpl=`menuParents`&parentClass=`navparents`&categoryFoldersTpl=`catHeadings`]]


    And here is my "catHeadings" chunk:
    <li class="menuheading">[+wf.linktext+][+wf.wrapper+]</li>


    Oh, and by the way, i have modx Evolution. smiley [ed. note: dinpapa last edited this post 14 years, 4 months ago.]
      • 19369
      • 1,098 Posts
      Hi, please wrap your Wayfinder Call and any other code with the "code" button that you find here in the forum, otherwhise it will not appear.
        • 40024
        • 72 Posts
        Ok, i just modified it. Thank you smiley
          • 19369
          • 1,098 Posts
          I have never used that parameter, but from the documentation it seems that you have to set a blank template or add rel="category" to the link attributes field in your category resource, see this: http://wiki.modxcms.com/index.php/Wayfinder#.26categoryFoldersTpl
            • 18373 ☆ A M B ☆
            • 3,141 Posts
            That sounds like behavior of an enabled hideSubMenus property.

            I think Wayfinder is thinking your notion of "FALSE" is actually 1 (true). Properties passed to a snippet are always a string (not an actual boolean value in this case) so it may not properly figure that out.

            As &hideSubMenus defaults to false anyway, try just removing that property from your snippet call.
              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • 40024
              • 72 Posts
              @microcipcip I have already done that.I have tried placing the rel="category" in link attributes and after it didn't work i set a blank template to my resource,but that didn't work either
                • 40024
                • 72 Posts
                @Mark Hamstra I also did that before(i mean erasing the &hideSubMenus=`FALSE` property).That way yes,i can see the children of the resource, but also i am able to see the children of all the parent resources, whereas i want only the children of this particular menu category resource to appear(by menu category resource i mean the resource where the &categoryFoldersTpl parameter applies to).
                  • 22427
                  • 793 Posts
                  Don't use FALSE and TRUE, but 0 and 1. See
                  https://github.com/splittingred/Wayfinder/issues/29


                  If you set &hideSubMenus=`1`, you will see just the immediate children of the actual page, but also it's "siblings".

                  You could try the parameters &displayStart and &startItemTpl - see
                  http://muddydogpaws.com/development/wayfinder/parameters.html

                  Read this too:
                  forums.modx.com/thread/?thread=40178&page=2 [ed. note: ottogal last edited this post 14 years, 4 months ago.]
                    • 40024
                    • 72 Posts
                    @ottogal Thanx for the &hideSubMenus correction.What i actually want to achieve is to have a menu,where the parents' children will not show.But i want a particular resource to be exceptional and have its children show(although it is not from where my menu starts). I want to achieve this menu:

                    Home(first page of the site,no children,the text is a link)
                    Features(it has children but they don't show,the text is a link)
                    Contact Us(no children,the text is a link)
                    About Us(it has children and they show,the text is NOT a link/unclickable)

                    I have managed everything so far,except making the " About Us" children to appear in the menu.
                    I tried the &displayStart and &startItemTpl combo but i didn't manage something.I am beginning to think that it can't be done. But after all, i am still a rookie tongue .
                      • 19369
                      • 1,098 Posts
                      You can simply use an if statement in the &rowTpl , for example with PHX, and output the [+wf.wrapper+] only when the page doesn't have the ID of the about us page.

                      For example, &rowTpl:
                      <li[+wf.classes+]>
                      	<a href="[+wf.link+]">[+wf.linktext+]</a>
                      	[+phx:if=`[+wf.id+]`:is=`ID_ABOUT_US_PAGE_HERE`:then=``:else=`[+wf.wrapper+]`+]
                      </li>


                      You can use the same technique to remove the link.

                      I am not sure if you need [+wf.id+] or [+id+] there, but it should work. I am sure that there are many other ways to accomplish a similar result, the if statement is the first that came to my mind.

                      Note: it may be needed to call Wayfinder uncached.