We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39273
    • 61 Posts
    Let's say I have this menu structure:

    First Container
    -- Inner Doc 1
    -- Inner Doc 2
    Second Container
    -- Inner Doc 3
    -- Inner Doc 4
    -- Inner Doc 5

    I want Wayfinder to show only the parent and one level inner documents. That's easy, I'm using: Wayfinder? &startId=`[[*parent]]` &level=`1` &outerTpl=`wf_Outer`. My problem is let's say a user lands on Second Container. I want the top menu option to be "Second Container", but by using Parent, I get First Container included. How can I configure Wayfinder so that the parent is used unless the parent is already a container and then not back up any further?
      • 4172
      • 5,888 Posts
      install ultimateParent and replace

      [[*parent]]
      with an ultimateParent - snippet-Call.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 39273
        • 61 Posts
        Getting closer (Thanks Bruno17) but not quite there. Now I am using: [[Wayfinder? &startId=`[[UltimateParent]]` &level=`1` &outerTpl=`wf_Outer`]]. The problem is if a user were to view "Second Container" (see tree above in earlier post) the children appear in the menu but "Second Container" does not. Only the children. How do I include "Second Container" if that is the currently selected resource?
          • 813 ☆ A M B ☆
          • 326 Posts
          Try setting &displayStart=`1` or &displayStart=`TRUE` (can't remember if it makes a difference which one).

          List of Wayfinder parameters here: http://rtfm.modx.com/display/ADDON/Wayfinder
            • 22427
            • 793 Posts
            Better don't use FALSE and TRUE, but 0 and 1. See
            https://github.com/splittingred/Wayfinder/issues/29


            With &displayStart=`1` you'll need the parameter &startItemTpl too.
            See http://muddydogpaws.com/development/wayfinder/parameters.html.
            Read this too:
            forums.modx.com/thread/?thread=40178&page=2