We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12147
    • 182 Posts
    Update: all set up and all working - except the link from which the submenus display, which is remaining open. The little graphics aren’t displaying, and the submenus aren’t indented as they were, which makes me think it’s a css (and maybe a little js) complication? I’ll see what I can figure out, anyway.

    Such a relief to have these links working (almost) as they should. Let me know if any further ideas about fixes.

    Wendy
      • 17883
      • 1,039 Posts
      Hi Wendy,

      are you sure that you put in the parentRowTpl part?

      Oh yes, okay. You have to call the Chunk "menu_parent_row_tpl" according to the Wayfinder call. I mistyped in my post.
        • 12147
        • 182 Posts
        Marc,

        Now, that was something I might have caught (but it would have taken me five times as long to see it).

        Looks /closer/ to perfect, but the over-links are not staying open once the page loads (they are open until the pages loads, though), so there’s no access to the submenus once the over-page is loaded (nor any little icon showing the page has sub-pages).

        What time is it now over there?? You should not bother any more about this tonight!

        Wendy
          • 17883
          • 1,039 Posts
          Does the document "Capital Campaign" have any content, or is only used as parent for the sub items? If there is no content to see, there is no need for the target, so try this:

          <li[+wf.id+] class="closed [+wf.classnames+]">
          	<a onClick="P7_swapClass(1,'p[+wf.docid+]','open','closed','li')"  title="[+wf.title+]">[+wf.linktext+]</a>
          	[+wf.wrapper+]
          </li>


          What time is it now over there??

          It was three o`clock, but I have some kind of insomnia this week :-(
            • 12147
            • 182 Posts
            Thanks - regrettably, it does have content that needs to be there. Would it help to create another empty folder (and one for Competitions, the other top menu)?

            ...Nope, just tried that and it doesn’t work. I still don’t know enough to be able to think things through. undecided
            Just for info, the new chunk code opens the menu, but when any of the subpages are clicked on, the menu closes (and theoretically should stay open).

            Maybe this is too convoluted? I looked at the Wayfinder/Accordion documentation, but that’s beyond me just yet.
              • 17883
              • 1,039 Posts
              Well, than we have a problem with the structure and/or the usability of that menu. The question is: What do you want to achieve? What should happen when clicking the Capital Campaign menu item? Obviously (now) is that the content of that document should be shown, then the menu should stay open. Well, this would be standard... you don`t need javascript at all for that. Try this call:

              [!Wayfinder?startId=`1` &rowTpl=`menu_row_tpl` &hideSubMenus=`true` &parentRowTpl=`menu_parent_row_tpl`  &parentRowHereTpl=`menu_parent_row_here_tpl` &rowIdPrefix=`p`!]

              menu_row_tpl like yesterday.

              menu_parent_row_tpl:

              <li[+wf.id+] class="closed [+wf.classnames+]">
              	<a href="[+wf.link+]"  title="[+wf.title+]">[+wf.linktext+]</a>
              	[+wf.wrapper+]
              </li>


              menu_parent_row_here_tpl (NEW!)

              <li[+wf.id+] class="open [+wf.classnames+]">
              	<a href="[+wf.link+]"  title="[+wf.title+]">[+wf.linktext+]</a>
              	[+wf.wrapper+]
              </li>



              One note: This only looks so complicated because I want to include your already used classes from your javascript menu. You don’t need the script anymore, but the styling still remains.


                • 12147
                • 182 Posts
                Thank you, Marc! It’s getting closer to perfect...the only thing now is that the menu doesn’t stay open when the sub-pages are open.

                In other words:
                Click Competitions: Competitions page loads, and all sub-pages show in menu (Dressage, Driving, Eventing, Hunter/Jumper, Trail).
                Click sub-page "Dressage": Dressage page loads, but sub-pages are no longer shown in the menu (only "Competitions" link is visible)

                I apologise for my persistence, and am hoping this is an intriguing problem for you and not pure drudgery which you wish you’d never undertaken!!
                  • 17883
                  • 1,039 Posts
                  Please delete the JS for the menu thing, you don need it anymore.

                  Then post again.

                  I apologise for my persistence, and am hoping this is an intriguing problem for you and not pure drudgery which you wish you’d never undertaken!!

                  No worries, this is MODx and its community wink
                    • 12147
                    • 182 Posts
                    Et voila: it works. Perfectly grin

                    Marc, thank you SO much for all your work on this. Your skills (and patience) are awesome.

                    I am very grateful indeed for all your help and attention, and so are the menus!
                    Wendy

                      • 1553
                      • 17 Posts
                      Hi,

                      Right now I have a menu like the Dropline example at muddydogpaws.com. I’d like to create something like http://centennialairport.com/Noise-Abatement with submenus that change according to the choice made in the top menu. Wendy, is this what you’ve accomplished with the help of Marc? I’m getting to grips with the Wayfinder parameters but fail to see how to create the structure like at http://centennialairport.com/Noise-Abatement.

                      I am puzzled with what to use as a placeholder; I assume this is done with the &ph parameter and have tried to use the name of the div in which the menu should reside. But it doesn’t work yet.

                      thanks in advance,

                      Andres