We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32645
    • 377 Posts
    How do I make multiple menus work in Modx?

    Ideally, I’d like to split my menus into three seperate areas;

    * Primary Navigation (which appears along the top of the page in a horizontal manner)
    * Secondary Navigation (which appears on the left-hand side, much like dropmenu works now)
    * Footer Navigation (which appears running horizontally along the bottom of the page)

    At first I created folders in the admin section with the names described above, but I realised that the "Contact us" appears in all three menus, and therefore cannot be three seperate pages.

    So what this means is that I must be able to assign a page to as many menu’s as required.

    Ala;

    <div id="primary_navigation">
    <ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">About</a></li>
    <li><a href="#">Contact us</a></li>
    ...(and so on)...
    </ul>
    </div>
    
    <div id="secondary_navigation">
    <ul>
    <li><a href="#">Item 1</a></li>
    <li><a href="#">Item 2</a></li>
    <li><a href="#">Contact us</a></li>
    ...(and so on)...
    </ul>
    </div>
    
    <div id="footer_navigation">
    <ul>
    <li><a href="#">Item 1</a></li>
    <li><a href="#">Item 2</a></li>
    <li><a href="#">Contact us</a></li>
    ...(and so on)...
    </ul>
    </div>
    
    


    How do I achieve multiple menus in modx? Thanks.
      • 25663 MODX Staff
      • 12,272 Posts
      I think you can create a weblink to the master contact page for each menu.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 17665
        • 54 Posts
        This is exactly what we did.

        Check out www.everynation.org, the navigation on the top, the left and the bottom are all in different folders using DropMenu. The left being the main folder with the others as folders in that folder (but set to now show up in the menu). In the footer you see we have "About Us" which is just a weblink to the actual content located in the Top Navigation folder.
          • 32645
          • 377 Posts
          Let me see if I have got this right....

          1. Create 1 folder (called main)
          2. Create sub-folder for each menu within the ’main’ category - you want to create (ie: primary-menu, secondary-menu, and footer-menu)
          3. If a page has to appear in one, two or all menus, simply create weblink in each of the menus as required?

          Have I got it right so far?

          The thing is I don’t get what the dropmenu looks like in my templates... Do I just dump the same dropmenu code in my template three-times? But won’t that just repeat the same menus?

          Please explain this, I’m really confused.

          Thanks.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Give each DropMenu a different startDoc. See my home page. The top menu and each side menu are done with a different DropMenu, each with a different startDoc. The one on top is &startDoc=`0`, and &levelLimit=`1`. If you go to the Links page, you’ll see another startDoc. I used a TV with the DropMenu in the left sidebar of my main template, so I can edit it for every page as I wish.
              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
              • 32645
              • 377 Posts
              This makes sense. Many thanks!
                • 25085
                • 4 Posts
                Quote from: luke.stokes at Mar 09, 2006, 12:06 PM

                This is exactly what we did.

                Check out www.everynation.org, the navigation on the top, the left and the bottom are all in different folders using DropMenu. The left being the main folder with the others as folders in that folder (but set to now show up in the menu). In the footer you see we have "About Us" which is just a weblink to the actual content located in the Top Navigation folder.

                that’s a good example. my client is asking me to produce something just like what you’ve done. excellent!