We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15953
    • 123 Posts
    I have a tab menu on child pages using a simple Wayfinder call in a template that child pages are based on:

    <div id="wrapper2">
    <div class="holder">
    [[!Wayfinder? &startId=`[[*parent]]` &level=`3` &outerClass=`tabmenu`]]
    </div>
    </div>


    This menu shows only the child pages. I would like it to also show the parent. And I would like the parent to show the same tab menu (itself and its children). Ideally the parent should use the same template as the children, but creating a different template for the parent would not be a big deal.

    How can I get the Wayfinder call to list both parent and children and how can I make it smart so it knows whether it’s being called from a parent or child?
      • 15953
      • 123 Posts
      OK - I did find information that is trying to lead me in the right direction (&displaySart=`TRUE`). However, my menu still does not show the parent, just the children. It seems straightforward huh but not working. Here’s my code for the "children" template:
      <div id="wrapper2">
      <div class="holder">
      [[!Wayfinder? &startId=`[[*parent]]` &level=`2` &displaySart=`TRUE` &outerClass=`tabmenu`]]
      </div>
      </div>


      I’m relying on the default &startItemTpl

      Any ideas???
        • 22427
        • 793 Posts
        I think you don’t need &displayStart and &startItemTpl.
        You may try the "UltimateParent" snippet:
        http://modxcms.com/extras/package/?package=475
        The Wayfinder call could be
        [[!Wayfinder? &startId=`[[UltimateParent?]]`]]
        but play around with the parameters &top and &id.
          • 15953
          • 123 Posts
          @ottogal-
          I think you don’t need &displayStart and &startItemTpl.
          You may try the "UltimateParent" snippet

          But [[*parent]] is returning the parent ID just fine. What would UltimateParent do differently, and even then what would tell Wayfinder to display the parent link. WF default is to not return the parent which, according to documentation is why displayStart parameter was added.
            • 15953
            • 123 Posts
            I got smart this time and set debug-`TRUE`. The debug output told me displayStart was set to FALSE. So I went back and looked at my code and sure enough I had missed the "t" in Start (displaySart)

            @ottogal - thanks for your input. I’ve looked into the UltimateParent snippet and have other uses for it.