We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10076
    • 1,024 Posts
    in evo one had the &level parameter, to limit the depth. Not sure in revo that still exists else it would be

    [[!Wayfinder? &startId=`[[UltimateParent? &id=`[*id*]`  &top=`3`]]` &level=`1`]]


    Checked that, the &level option is still in Wayfinder.
      • 15577
      • 10 Posts
      That code gives exactly the same output as the last code.

      [[!Wayfinder? &startId=`[[UltimateParent? &top=`1`]]`]]
      [[!Wayfinder? &startId=`[[UltimateParent? &id=`[*id*]` &top=`3`]]`]]
      [[!Wayfinder? &startId=`[[UltimateParent? &id=`[*id*]` &level=`1` &top=`3`]]`]]
      All these three codes gives the same output undecided
        • 10076
        • 1,024 Posts
        what s the top param for?
        And is it live somewhere?Sorry did not see the links in the first post.

        try this and empty cache first:
        [[!Wayfinder? &startId=`[[UltimateParent?]]`&level=`1`]]



          • 15577
          • 10 Posts
          Awsome, that worked!

          Is there a special button for setting this topic as resolved so it is easyer for others to find?


          Thank you so much for your time guys smiley
            • 10076
            • 1,024 Posts
            Good you ’ve got it working.
            I normally change the first post and add [resolved] in front of the subject.

            [resolved]Use wayfinder for 2 level documents


            BTW are you going to integrate a domain lookup tool in there? To chack availability of a domain name?
            I could need one.
              • 15577
              • 10 Posts
              You can use the one at our portal smiley
              http://portal.fleksiweb.net/domainchecker.php
                • 22427
                • 793 Posts
                So simple:
                [tt][[!Wayfinder? &startId=`[[UltimateParent?]]`&level=`1`]][/tt]
                Fine that it’s helping you out.

                The result is a menu showing all the entries of the second level, immediatly below the root document.
                But given the case you want to display the documents of the third level. Then you need the [tt]&topLevel[/tt] parameter which doesn’t exist in the version 1.3 of [tt]UltimateParent[/tt] .

                I finally managed to install the package of the actual version 2.0-pl ( http://modxcms.com/extras/package/?package=475 ) (In the [tt]Package Retreiver[/tt] I had to [tt]Select a Provider[/tt] , choose [tt]modxcms.com[/tt] , [tt]MODx Add-Ons[/tt] and then [tt]Menu[/tt] (not [tt]Navigation[/tt] ).

                But despite the successful installation the [tt]&topLevel[/tt] parameter does not work - and if I check again under [tt]Elements > Snippets > UltimateParent[/tt] I see the code of version 1.3, like before... huh

                EDIT:
                Sorry for that: Here I obviously was a bit confused. I now realized, that in the PHP code of the [tt]UltimateParent[/tt] snippet there already is support for [tt]&topLevel[/tt] , and also that it’s working fine. Just the version info in the comment is always "1.3". laugh
                  • 10076
                  • 1,024 Posts
                  If you want to show third level, just leave out the level param or set it to ’3’ or ’0’ (never know where to find the backticks on an Italian kbrd)

                  Off course other option would be a tv for the level. eg create a tv input bype "radio", input option value
                  one level==1||two levels=2||three levels=3
                  Defaulting to eg 1, Name it eg "level", assign it to your template(s) and the wayfindercall like this:
                  [[!Wayfinder? &startId=`[[UltimateParent?]]`&level=`[[*level]] `]]
                  . Choose the difference depth if they need to be different for other pages

                  Maybe thats a long way around, but a way to make it a bit flexible.
                    • 22427
                    • 793 Posts
                    If you want to show third level, just leave out the level param or set it to ’3’ or ’0’
                    No, that’s a different thing.

                    Putting [tt]&level=`3`[/tt] means you want to display 3 levels of the menu.
                    But with [tt]&startId=`[[UltimateParent]]`[/tt] this will always start at the second level, directly under the root of the tree.

                    If you want to start at a lower level, you need [tt]&top[/tt] or [tt]&topLevel[/tt] .

                    Imagine this tree:

                    [tt]home (1)
                    |__one (2)
                    |__one-1
                    |__one-1-1
                    |__one-1-1-1
                    |__one-1-2
                    |__one-2
                    |__one-2-1
                    |__one-2-2
                    |__one-2-2-1
                    |__two (3)
                    |__two-1
                    |__two-1-1
                    |__two-1-2
                    |__two-1-2-1
                    |__two-2
                    |__two-2-1
                    |__two-2-2
                    [/tt]
                    Assume you want to have a menu in [tt]one-1-1[/tt] , in all the documents of the same level and in all the documents of lower level, and this menu should start with [tt]one-1 / one-2[/tt] for documents below of [tt]one[/tt] and [tt]two-1 / two-2[/tt] for documents below of [tt]two[/tt] .

                    This is resolved by the following call:
                    [tt][[!Wayfinder? &startId=`[[UltimateParent? &topLevel=`3`]]`]] [/tt]

                    In lack of the [tt]&topLevel[/tt] parameter, you would have to put two different calls:
                    [tt][[!Wayfinder? &startId=`[[UltimateParent? &top=`2`]]`]][/tt] for the first case, and
                    [tt][[!Wayfinder? &startId=`[[UltimateParent? &top=`3`]]`]][/tt] for the second one.