We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10208 ☆ A M B ☆
    • 1,780 Posts
    What happens if you remove the class from subnav-ul? Menu show up?
      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
      • 10208 ☆ A M B ☆
      • 1,780 Posts
      Ottogal - That's very interesting. Thank you. I wish there were more information about UltimateParent, seems there's only three parameters shown and not much else in the way of information about how it works.

      I hadn't noticed the difference in which menus needed the level set from the root, I assumed since I was setting Wayfinder, that it applied to Wayfinder.




        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
        I've now stripped down the subnav-ul chunk to the bare minimum
        <ul>[[+wf.wrapper]]</ul>
        


        still nothing!
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          I wrote the basic Evo version of it many years ago, but all it did was return the top-level ultimate parent. I think I also added the topLevel, but I don't really remember. Others added to it over the years, and of course now there is the Revo version.

          From the comments in the code:

           * @example [[UltimateParent? &id=`45` &top=`6`]]
           * Will find the ultimate parent of document 45 if it is a child of document 6;
           * otherwise it will return 45.
           *
           * @example [[UltimateParent? &topLevel=`2`]]
           * Will find the ultimate parent of the current document at a depth of 2 levels
           * in the document hierarchy, with the root level being level 1.
          
            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
            • 22427
            • 793 Posts
            @pauloneill79

            Voilà! In your chunk "navrow" for the &rowTpl the [[+wf.wrapper]] is miising!
            It should be like this:
            <li [[+wf.id]]><a href="[[+wf.link]]"  [[+wf.classes]] title="[[+wf.title]]"> [[+wf.linktext]] </a>[[+wf.wrapper]]</li>
              • 10208 ☆ A M B ☆
              • 1,780 Posts
              I found a post where Ottogal pointed out that part of the snippet just a few days ago. Attempting to use the &top and &topLevel flunked out. OK, I mean I flunked out attempting to use them.
                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
                @ottogal
                YES! that was it. Thanks for your help!

                So 2 learnings: remember the [[+wrapper]] placeholder, hide sub menues follows a 0 and true logic. [why hasn't the wiki changed to reflect this?]


                So what does that final placeholder [[+wrapper]] do.

                Guess
                - contains a placholder for lower level uls to appear below this level?
                  • 10208 ☆ A M B ☆
                  • 1,780 Posts
                  First off, you might want to use the official Revolution documentation at http://rtfm.modx.com/display/ADDON/Wayfinder instead of the Wiki, which was used when there was only Evolution. All the current documentation for both Evo and Revo is at the RTFM now.

                  But that doesn't change much that the documentation is a little obscure yet still. It does say make sure the wf.wrapper is required, in a couple places but the &rowTpl is lacking it. Where it does point out that wf.wrapper is required to show submenus, is in a parameter you're not using.


                  &parentRowHereTpl
                  Name of the chunk containing the template for the current document if it is a container and has children. Remember the [wf.wrapper] placeholder to output the children documents.
                  &parentRowTpl
                  Name of the chunk containing the template for any document that is a container and has children. Remember the [wf.wrapper] placeholder to output the children documents.

                  and it also states this:

                  &outerTpl

                  Name of the chunk containing the template for the outer most container; if not included, a string including "<ul>[[+wf.wrapper]]</ul>" is assumed

                  Available placeholders are:

                  wf.classes - outputs relevant classes (including class=" ")
                  wf.classnames - outputs relevant classes (without class=" ")
                  wf.wrapper - outputs inner (row) contents. This placeholder is required.

                  The parameters table does show "TRUE" and "FALSE" as options, and defaults. Not sure why, since the golden rule is to use 0 and 1 in MODX.

                  My question is, to those who actually know how Wayfinder is built, is there ANY reason to use TRUE or FALSE in any Wayfinder call, ever? Or could the documentation be changed completely and TRUE and FALSE omitted entirely?


                    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
                    @pauloneill97:
                    Guess - contains a placholder for lower level uls to appear below this level?
                    Yepp! smiley

                    @Frogabog:
                    Or could the documentation be changed completely and TRUE and FALSE omitted entirely?
                    In fact, it should be changed in this sense. But obviously no one feels responsible for such a task. [ed. note: ottogal last edited this post 13 years, 11 months ago.]
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Documentation at http://rtfm.modx.com/display/ADDON/Wayfinder changed. The .pdf documents available I can't do much about, as I have no way to "open" a .pdf for editing.
                        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