We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6584
    • 37 Posts
    Hello,

    Here is a problem:

    doc 1
    doc 2
    doc3
    doc4
    doc 5
    doc 6
    doc 7

    So, I need second level (doc 2, 5, 6) in horisontal navigation, while in vertical I would need third level of active second level doc (doc 3, 4 for active doc 2).
    I tried with UltimateParent? for vertical navigation, but it returns second level docs.

    Thanks!
      www.ri-mo.org
      • 4310
      • 2,310 Posts
      You would need direct parent rather than ultimate parent!
      Not sure such a thing exists.
      On each third level page you could just use a wayfinder call with the &startId set to the id of the second level page.

      David
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Here is where a TV with the default @INHERIT would be useful. Set it in the container document, and all of the children will inherit that value. Use the TV tag as the startId value for the Wayfinder call.
        [!Wayfinder? &startId=`[*startvalue*]` &level=`whatever`!]
          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
          • 4310
          • 2,310 Posts
          Hello Susan,
          Would you set the value of the TV on the parent page as:
          Input Option Values: @INERIT
          Default Value: [~id~]

          Just so I know!

          David
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            No, I would put the default value to be @INHERIT, then only edit that TV for parent-level documents. It needs to be the actual document ID, not [*id*], since the children will inherit the actual value (in that case, the literal tags [*id*]) for each page, when what you want is the ID of the parent document.
              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
              • 4310
              • 2,310 Posts
              Thanks Susan,
              I’ve just tried this and it works well on my version of the fisheye menu.
              The only thing to watch out for is -
              set the TV default value to @INHERIT
              change it to the numeric value of the doc id in the TV on each parent
              otherwise you get a repeat of the top level menu on the pages that have no children

              David
                • 8416
                • 173 Posts
                Hi David,
                I’m trying to display a horizontal menu with 3 levels.

                In my template I’ve defined a menu as:

                [[Wayfinder? &startId=`0` &level=`3` &parentClass=`hide` &parentRowTpl=`cssplay_parentRow` &outerTpl=`cssplay_outer` &innerTpl=`cssplay_inner` &rowTpl=`cssplay_row` &outerClass=`menu` &cssTpl=`cssplay_basicdd`]]

                Let say if I have the following doc structure. I don’t see my Doc 1.1.1/1.1.2/1.1.3 menus.

                Doc1
                Doc 1.1
                Doc 1.1.1
                Doc 1.1.2
                Doc 1.1.3
                Doc 1.2
                Doc 1.2.1
                Doc2

                Do I need to define a TV with @INHERIT as a default value and then add in each second level menu Document content the following line?

                [!Wayfinder? &startId=`[*startvalue*]` &level=`2`!]

                This seem to be lots of redundant code... Please let me know as I don’t quiet understand. I thought by having &level=`3` would take care of displaying submenus...
                Thank you.

                Eric




                  • 4310
                  • 2,310 Posts
                  Hi Echland,
                  If you want a 3 level menu like the one below then you shouldn’t need an extra TV.
                  Do you have a link?
                  If not what does the source code look like?
                  Does it output the menu items like this:
                  <ul>
                  <li><a href="doc1">doc1</a>
                         <ul><li><a href="doc1.1">doc1.1</a>
                                 <ul><li><a href="doc1.1.1">doc1.1.1</a></li>
                                         <li><a href="doc1.1.2">doc1.1.2</a></li>
                                         <li><a href="doc1.1.3">doc1.1.3</a></li>
                                </ul>
                                 <li><a href="doc1.2">doc1.2</a>
                                 <ul><li><a href="doc1.2.1">doc1.2.1</a></li>
                                </ul>
                                 </li>
                  </ul>
                                </li>
                            </ul>
                  </li>
                  <li><a href="doc2">doc2</a></li>
                  </ul>

                    • 8416
                    • 173 Posts
                    Thanks actually I got it working with a custom CSS. Thanks for your help....