We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6584
    • 37 Posts
    I’ve been breaking my head on this for some time:

    document 1
    document 2
    document 3
    document 4
    document 5
    document 6
    document 7
    document 8
    document 9
    document 10
    document 11
    document 12
    document 13
    document 14
    document 15

    documents on level 3 and 4 use the same template, and should display level 3 on horizontal menu, and level 4 on vertical (only on level 4 docs, and on their parent).
    I know it should be solved with &startId, but cannot figure how.

    Thanks


      www.ri-mo.org
      • 4639
      • 36 Posts
      Hi, I don’t quite understand what you need but I recommend that you first code the menu (HTML + CSS [+ JS]) manually and then translate that to the appropriate wayfinder templates and parameters (AKA. &startId)

      Also, it would be a lot easier for anybody to help if you post an example image.
        • 7291
        • 129 Posts
        I’m guessing that you would like 2 different menus? For the first horizontal menu have startid=`3`(parent of docs you would like to include in menu) and levels=`1` to only show the 3rd level in the menu.

        For the other menu have startid =`4`

        If you want this in one menu showing 4 levels then just put levels=`4` in your ditto call.

        Helps to read up on the parameters to get an understanding of what’s possible.
          [center]-- smiley --[/center]
          [center]New View Media - Custom Website Design[/center]
          [center]Custom Website Design & Marketing = Strategic Business![/center]
          • 6584
          • 37 Posts
          I tried that but if I put startId=’3’ it only shows first level 2, and my site has two 2nd levels (and two 3rd levels).
          I am looking for a way to have flexible startId that would change for level you are on.

          Is there anybody with an answer?
            www.ri-mo.org
            • 7231
            • 4,205 Posts
            I am looking for a way to have flexible startId that would change for level you are on.
            What you are looking for is the UltimateParent snippet. This will return the ID of the parent (you decide how many levels down from the root) of the current document. It is included with the default snippets during the installation.

            From the docs:
            * @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.

            Here is an example call:
            [!Wayfinder? &startId=`[[UltimateParent? &topLevel=`2`]]` !]
            This will return the the second level parent of the current document. Change the topLevel to 4 and it will return the 4th level parent and so on.
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don't know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 6584
              • 37 Posts
              Thanks, that solved the problem!
                www.ri-mo.org