We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    ListMenuX has a number of arguments you can call it with:

    &id=   document ID of root folder (or 0)  [[ListMenuX?id=0]]
    &depth=  how many levels   [[ListMenuX?id=0&depth=5]]
    &nodiv=  true/false to add <div> tags before and after the list  [[ListMenuX?id=0&nodiv=false (true by default)
    &divId=   what you want the above div's id to be if set to true  
    &divClass=  what you want the above div's class to be if set to true
    &ulClass=  what class name to give UL tags
    &liClass= what class name to give LI tags
    &activeLinkClass= what class name to give to the "active" or "current" A tag
    


    I’d attach DropMenu for you, but I’ve already hacked all my copies to suit myself... best way is to download the new MODx and take snippet.dropmenu.tpl from the Install folder.
      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
      • 25663 MODX Staff
      • 12,272 Posts
      You really should grab the lastest version as there are numerous bug fixes and enhancements across the board to 0.9.0 (which coincidentally is rev444... meaning almost 200 source code commits after the version you’re using... upgrades are really straightforward).

      http://modxcms.com/forums/index.php/topic,1207.0.html
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 32230
        • 18 Posts
        Bloody hell ... I only downloaded it last week from your website !!!
        How fast are you working ?? wink

        Maybe I acidentally downloaded an old version then huh  Ooops.....
          • 18397
          • 3,250 Posts
          Quote from: sottwell at Nov 02, 2005, 03:05 AM


          Am i right in thinking that I need to use TVs in order to define the correct sidemenu to show on each specific page within a section/folder ?

          You can do it the simple way! Either use one of the subnav snippets such as this one by jaredc (http://www.etomite.org/forums/index.php?showtopic=1761) or when specifying the id for the subnav just use [*id*] to pull all of the current documents children.

            • 25663 MODX Staff
            • 12,272 Posts
            Quote from: Weldo at Nov 02, 2005, 09:45 AM

            Bloody hell ... I only downloaded it last week from your website !!!
            How fast are you working ?? wink
            Pretty fast I guess. We’ve got 7 release tags inside our Subversion source code repository. And we’re just shy of working on MODx one year.

            Maybe I acidentally downloaded an old version then huh  Ooops.....
            Probably not really... we released it on Friday, Oct 28 very early in the AM ... around 2AM CST (GMT -600) I think. We’re sneaky that way... lol wink
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              I just created a snippet that will display only the current document’s submenu, or if it’s the home page will display the entire menu structure. It was for a system that has the main menu across the top, and each submenu is shown in the left sidebar. See this thread: (ignore the potato salad discussion...)

              http://modxcms.com/forums/index.php/topic,1274.msg8269.html#msg8269

              The snippet will work with any menu snippet:

              [!SnippetCall?id=[[GetDoc]]!]


              The main snippet has to be called with the [!...!] form in order for the inner snippet to get parsed properly.
                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
                • 32230
                • 18 Posts
                oooh ... sneaky ....

                ... this is only my second day in the world of CMS ... and in many ways I’m feeling out of my depth already - snippets, variables, paramaters, etc ... ?

                Guess i picked a bad time to give this a go with the boss breathing down my neck too .......

                Thanks for all your help everyone.

                Expect some more questions tommorrow !!
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Quickie definition:

                  Snippet: a little bit of PHP code that does something like getting the document IDs and names from the database, making a menu out of them, and the results get displayed on the page in the same place you called the snippet. All you have to do is style the results with CSS.

                  You tell it exactly what you want it to do by giving it arguments:

                  [[DropMenu?startDoc=0]]


                  ?startDoc (or &startDoc if it’s not the first one, just like hyperlinks and query strings) is a variable (inside it’s called $startDoc, so PHP knows it’s a variable), since it could hold any document ID.

                  [[DropMenu?startDoc=45]]


                  The beauty of a CMS is that you really don’t need to learn a lot; the snippets will be "black boxes" that you just plug into your HTML wherever you want them. You do need to learn what arguments they take, and what they will do if you don’t give them any arguments. Like DropMenu will always use 0 as its $startDoc if you don’t give it one. So if you want it to use the root of the site as the base to build the menu on, you can just skip giving it one, it will use 0 by default.
                    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
                    • 32230
                    • 18 Posts
                    Quote from: Mark at Nov 02, 2005, 09:56 AM


                    You can do it the simple way! Either use one of the subnav snippets such as this one by jaredc (http://www.etomite.org/forums/index.php?showtopic=1761) or when specifying the id for the subnav just use [*id*] to pull all of the current documents children.

                    Oh ... that’s very handy !! Thanks Mark.
                    It’s pretty close to exactly what I need at this point .... but I need to tweak it so that the parent link doesn’t show at all in the sub menu ?? And I might need to call several lists per page .. broken into sections ? Maybe I should contact jared directly ?

                    I’ve got a very clear nav structure that I need to copy - you can see what I mean at : www.martindawessystems.com

                    Anyone care to help out this PHP dimwit huh
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      I just added a new template that does just that. It uses two calls to the DropMenu snippet, one across the top only displays a single level of links. The other is in the sidebar, and it is called with &startDoc=[*id*], so it only shows the submenus of the top link clicked on. It also has a third menu at the very top, to either have a menu of external links, or of internal virtual site links, if your site is broken up into virtual sites for example by language.

                      http://modxcms.com/forums/index.php/topic,1284.msg8318.html#msg8318
                        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