We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21191
    • 236 Posts
    http://121msg.com:888/products <--example page

    I have a doc tree that is like

    cat1
    -+sub_cat1
    --sub_cat1_doc1
    --sub_cat_doc2

    -+sub_cat2
    --+sub_cat2_sub_cat_1
    ---sub_cat2_sub_cat_1_doc_1
    ---sub_cat2_sub_cat_1_doc_2
    cat2
    similar to above etc.

    basically 3 to 4 levels deep, but some only 1 or 2 levels deep, but I’d like a subnav to do it all. "one call for them all"

    I’ve tried

    [!Wayfinder? &startId=`[[UltimateParent?&topLevel=`3`]]`&level=`1`!]

    and I get get it to work well on different levels based on the &topLevel = var adjustments.

    I’ll admit I’ve had problems finding good docs on ultimateparent, so basically I need at the bottom of the tree to still see one level up, so the subnav always has something in it. ListMenu will do it fine as well, it’s just messy.

    so if his has been covered else where slap me with a trout and I’ll take my licks, and feed me the link smiley
      ~Shawn Himmelberger
      Check out my MODx Development and MODx Design Company - Himmelberger Design
      • 21191
      • 236 Posts
      *bump *
        ~Shawn Himmelberger
        Check out my MODx Development and MODx Design Company - Himmelberger Design
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        The &topLevel parameter of UltimateParent refers to a document ID, not how many levels up you want to go! If you give it a value of 3, it will stop when it reaches a document ID of 3. This is only useful in a single "branch" of the tree.
          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
          • 21191
          • 236 Posts
          I appreciate the info! my method is to try stuff and see what works.

          So is this possible with Wayfinder? (my parent question)
            ~Shawn Himmelberger
            Check out my MODx Development and MODx Design Company - Himmelberger Design
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            I believe you could use UltimateParent (bare, no options) and a &displayStart, a new Wayfinder option to also display the "root" element specified in the &startId argument as part of the menu. I’m not sure how it works, I haven’t had occasion to use it yet.
              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
              • 21191
              • 236 Posts
              [!Wayfinder?startId=`[*parent*]` &level=`1`!]

              This call did the trick, power to the PEOPLE!
                ~Shawn Himmelberger
                Check out my MODx Development and MODx Design Company - Himmelberger Design