We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33657
    • 128 Posts
    So here is my side menu

    - Home
    - - -Sub Home One
    - - -Sub Home Two
    About
    - - -About Side One
    - - -About Side Two
    Providers
    - - -Providers Side One
    - - - - - -Providers Sub Side One
    - - -Providers Side Two
    - - -Providers Side Three
    Contact


    now each SUB PAGE has a left menu that I only want to show the SUB Menu's on... (so no home, no about, no info, no contact) I just want to show the submenus from That submenus parent.




    if i do
    [[*id]]
    for the &startid then it works on the first submenu level. but the second submenu level see's
    [[*id]] 
    from the second submenu level where i also want it to be the first..

    for example...
    you click on Providers

    I want Providers LEFT SIDE BAR menu to look like this:

    - - -Providers Side One
    - - - - - -Providers Sub Side One
    - - -Providers Side Two
    - - -Providers Side Three

    just the submenu sides of info. when I click on Providers sub side one (level 3) I want the same menu... but the only way I can do this is if i set the start id to a # (whatever resource id info is)

    [[Wayfinder? &outerTpl=`sidebarContainer` &cacheResults=`1` &level=`0` &startId=`19` &hideSubMenus=`true`]]
    



    the problem with this method is that I end up making 5 templates (one for each section) home subpage template, about us subpage template, info subpage template, etc..

    I'd like to have just ONE template with 1 sidebar and have a wayfinder or get resources call that calls the ultimateparent of level 1 but UP ends up calling level 2 when I am on level 3. (which makes sense, just not what i want)

    so is there a secret command or filter that does what i want?

    like if level 3 call level 2 ultimate parent, or same thing for wayfinder? [ed. note: zurie last edited this post 15 years, 1 month ago.]
      • 22427
      • 793 Posts
      For your aim there is the parameter &topLevel of UltimateParent.
      Try this Wayfinder call:
      [[Wayfinder? &outerTpl=`sidebarContainer` &cacheResults=`1` &level=`0` &startId=`[[UltimateParent? &topLevel=`1`]]` &hideSubMenus=`true`]]

      [ed. note: ottogal last edited this post 15 years, 1 month ago.]
        • 33657
        • 128 Posts
        thanks! that worked just like I needed. now I don't need 7 templates for 7 sections plus if anyone makes a new section this template will work with it! awesome!
          • 22427
          • 793 Posts
          awesome!
          That's MODX...