We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24723
    • 19 Posts
    I got my Wayfinder menu setup to work perfectly except for one thing that’s driving me crazy. A section of the website I’m creating will have a large number of sub-sections and each subsection will need its own independent menu to navigate between the pages. So, there will be three levels of parent/children in this section of the site. One parent to denote the site section, a bunch of children of that parent to denote different programs within, and children of those parents that will be the form the program details. (I’m sorry if this is confusing.) It’s these children that will need a menu system to navigate between while ignoring the others.

    Essentially:
    >Programs
    •Landing 1
    -Page 1
    –Page 2
    •Landing 2
    -Page 1
    -Page 2

    My Wayfinder call is:
    <ul>
    [!Wayfinder? &startId=`[*parent*]`&displayStart=`true` &outerTpl=`outer` &startItemTpl=`navtop` &parentRowHereTpl=`navtop` &excludeDocs=`1`!]
    </ul> 


    navtop:
    <li>
    <a href="[+wf.link+]">[+wf.linktext+]</a>
    </li>[+wf.wrapper+
    ]

    outer:
    [*wf.wrapper*]

    This works very well unless I’m on the Landing pages of the given program, in which it then lists the main "Programs" page in the menu also. I understand why it does this as my Wayfinder call instructs it to list the parent page, but is there a way to prevent it from listing the "Programs" page while still retaining all links within each subsection (including the subsection’s parent)?

    Thanks for any help!
      • 26016
      • 561 Posts
      Hi,
      If I followed that, I’d say just try ditching the &displaystart command, and you could experiment with using [[UltimateParent]] instead of *parent* as the startId. (check the syntax on that, I’m going from memory).

      Whenever different things are needed on different levels, more templates may be needed to house the different calls, or at least some way to pull in the different call code. I’ve had some clients that go crazy with different menus on every level. Wayfinder has never failed me, although sometimes it becomes really complicated.

      Actually, for people who have ridiculously many levels, I usually suggest just doing a bare Wayfinder call, which shows everything in the menu in a sidebar, and just style the "current location" so they know where they are. They never go for this. smiley Well, I’ve just gotta charge more money!

      Good luck, D
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Sounds to me like you could use &hideSubMenus; this way the child menus don’t show until you’re "on" the parent page.
          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
          • 24723
          • 19 Posts
          Quote from: samba at Oct 13, 2010, 10:21 AM

          Hi,
          If I followed that, I’d say just try ditching the &displaystart command, and you could experiment with using [[UltimateParent]] instead of *parent* as the startId. (check the syntax on that, I’m going from memory).

          Whenever different things are needed on different levels, more templates may be needed to house the different calls, or at least some way to pull in the different call code. I’ve had some clients that go crazy with different menus on every level. Wayfinder has never failed me, although sometimes it becomes really complicated.

          Actually, for people who have ridiculously many levels, I usually suggest just doing a bare Wayfinder call, which shows everything in the menu in a sidebar, and just style the "current location" so they know where they are. They never go for this. smiley Well, I’ve just gotta charge more money!

          Good luck, D

          Sorry it was confusing, but [[UltimateParent]] worked great! I’m glad I didn’t have to do some fancy templating! laugh

          Thank you for your help!