We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10075
    • 20 Posts
    I havea client who is moving to a CMS. I’ve chosen MODx Revolution as the CMS (I’ve used Evo in the past, and MODx seems like the best fit for their needs). However, the client has asked for a very specific navigation system that’s got me stumped.

    They want a navigation system based on popup menus. Essentially, imagine this:

    There is a Container called "Products." Under that container are resources:
    Lawn Mowers
    Hedge Trimmers
    Laser Cannons

    There’s another Container called "Services." Under that container are resources:
    Massage
    House Painting
    Satellite Launching

    There’s a third Container called "Men’s Clothing." Under that are resources:
    Pants
    Shirts
    Shoes
    Socks
    Body Armor

    What they want are two popup menus. The first popup menu lists the containers:
    Products
    Services
    Men’s Clothing

    The second popup menu automatically updates with all the resources under the chosen container. So if a user clicks on the first popup and chooses Services, the second popup automatically populates with
    Massage
    House Painting
    Satellite Launching

    Then if the user says "No, wait, I was looking for products" and changes the first popup to Products, the second popup clears and populates with
    Lawn Mowers
    Hedge Trimmers
    Laser Cannons

    Under this would be a Go button, so if the user chooses Products, then Hedge Trimmers, and clicks Go, he goes to the Hedge Trimmers page.

    Any ideas? Is this doable, or should I tell my client to forget it?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I don’t know about the "popup" part, that sounds like it would take some javascript. However, using Wayfinder with its &hideSubMenus parameter will do the trick. You have your top-level menu, and submenus only show when you’ve clicked on one of the top menu level items.

      With a bit of javascript, you can make accordions or popups or slide-outs or whatever you want. Wayfinder just generates nested unordered lists, which most of the javascript libraries require.
        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