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

    i need a little bit help with a navigation for my site. as first i will show you my ressources-construct.

    + index ( 1 )
    + page ( 2 )
    + + page one ( 3 )
    + + page two ( 4 )
    + + page three ( 5 )
    + reference ( 6 )
    + + ref one ( 7 )
    + + ref two ( 8 )
    + + ref three ( 9 )
    + about ( 10 )
    + contact ( 11 )

    so, my main-navigation is in the header chunk:
    [[Wayfinder? &startId=`0` &level=`1` &outerClass=`navi`]]

    this will show me only the level-1-pages.

    but when i click on page (2), i have in my content a new navigation with the subpages (page (3), (4) and (5))

    thats i try with:
    [[Wayfinder? &startId=`[[*id]]`]]


    the problem is: when i now click on one of the subpages (they have all the same template with the same code), then my subnavi isn't there, cause the id is 3, 4 or 5 and these id's doesnt have a subnavi, too.

    i dont wanna use two different templates, to make a different navigation..

    i hope you know, what i mean and want.. if not, please ask.

    kind regards
    xoxo

    This question has been answered by sottwell. See the first response.

    [ed. note: zapzarap last edited this post 14 years, 8 months ago.]
    • discuss.answer
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Do you want the main menu to always display the top-level items, then when you are on page(2) you want to see a submenu of its children as well?

      In that case, you want to use &level=`2` plus &hideSubMenus=`1`. This will only show a submenu when you're on the parent page.

      If you only want to see the submenu when you are on page 2, then you'll need to use the UltimateParent snippet for the startId value. http://modx.com/extras/package/ultimateparent
        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
        • 38537
        • 34 Posts
        UltimateParent was the snippet I searched. Thanks a lot!