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

    Would anyone know how the "expanding" menu at the http://modxcms.com website is implemented?

    For example, when I choose About from the right sidebar, it expands to show a next level of menu items.

    Thanks for all suggestions.

    Drew (the newbee)
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That can be done in two ways. With Wayfinder, you can use the &hideSubMenus parameter. Or, you can use pure CSS with display:none and display:block like any other CSS list menu.
        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
        • 8033
        • 6 Posts
        Thanks for the reply.

        I was hoping that there was an existing Module, Plugin or Snippet that provides such a feature without the need for manually scripting it.

        How were your expanding submenus (at sottwell.com) implemented?
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          That’s just the default minimal installation. The Wayfinder call:
          [!Wayfinder? &startId=`0`!]
          The relevant CSS:
          #dropmenu ul ul { display:none; }
          #dropmenu li.active ul { display:block; }
          

          I could just as easily done it with the &hideSubMenus parameter in the Wayfinder snippet and skipped the CSS:
          [!Wayfinder? &startId=`0` &hideSubMenus=`1`!]
            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