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
    Here’s one that’ll even sweep the floor, I think
      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
      • 18397
      • 3,250 Posts
      MARKSVIRTUALDESK Reply #12, 21 years ago
      Isn’t that the replacement for the menubuilder snippet which will be included in TP3.3? grin
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Could be. I’ve got 38 snippet in my snippet collection now. My collections aren’t too particular about where they get their content. I haven’t used it, I’m still comfortable with ListMenuX.
          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
          • 13577
          • 302 Posts
          0.9a Release
          New(er) and improved!

          OK, Dimmy arm twisted me (not really wink) in to mutilating this snippet to do some funky stuff. I reckon it’s best to let others enjoy the fruits of my labor as well. For those who have been playing along and have been using the ol’ Etomite version of ListGlobal, here is my changelog of what is new in version 0.9a (from the previous 0.6e and 0.6f versions):


          ** 0.9a **
          - Added classes so every section is now classed as one of 10 classes which
          indicate if it is active, before or after the active, the first or last item,
          or whether there are no active sections at all (such as in the case of a
          search results page)
          - Also updated the version number to reflect matching compatibility with
          MODx
          - Switched $etomite object references to $modx
          - Accounted for MODx ability to hide options from the menu (hidemenu)
          - Added ability to define what to use as the tooltip text
          - Menu title uses "menutitle" if available or else defaults to "pagetitle"
            Standard Disclaimer
            I could be totally wrong.
            • 7455
            • 2,204 Posts
            Go Jared your the best Your the best!

            Thank Jared for taking the time to change this script for my needs (and for the rest of the comunity) this gives MODx so mutch more potential for making funky menu items (If I want to I could have all the items a diff look YEAH)

            Nice work!

            Dimitri
              follow me on twitter: @dimmy01
              • 1876
              • 835 Posts
              Hi

              I try to use it but it don’t take car of my parameter :

              [[ListGlobal?LGlob_node=45]]
              : I see with node=0

              I modified the value in the snippet code :

              $node = 45;
              : I see with node=0

              The parent id of id45 is id0

              Aour
                • 13577
                • 302 Posts
                I am not sure which version you are using... but if you have this bit of code:

                // Change root node if necessary
                if ($node && !$thisParent){
                  $node = 0;
                }
                

                Try removing it. As I look at it... I can’t remember for the life of me why that’s there and it looks like the bit that’s causing the problem. I’ll keep looking at it and report back if that is a vital bit.

                [UPDATE]

                Yeah that bit seems kinda useless. I think it’s a carry over from earlier versions. I’ll have to snip it out (nice pun eh?) when I get to it.
                  Standard Disclaimer
                  I could be totally wrong.
                  • 7455
                  • 2,204 Posts
                  Jared could you merge this snippet with the listsection snippet? what I am realy asking is that the option for multiple nodes is implemented like this ones I atach it here.

                  I use [[UltimateParent]] now but this merg wil give more posibilities
                  Thanks a lot
                    follow me on twitter: @dimmy01
                    • 13577
                    • 302 Posts
                    Wow... where do you people find this stuff. I looked at that and saw my name on it and thought... "I wrote that?" laugh

                    Then I saw that date - a year ago. I won’t go into how bad my memory is- but I will say there’s a reason I include my name, date, and a typically generous amount of commenting in my code! wink

                    I don’t think I’m still very clear on what is being asked Dimmy. Are you looking for a way to set arbitrary "global" folders?

                    Edit
                    Are you referring to the post about UltimateParent? And if so, Doesn’t ListSections work for you if you specify the allowed sectionRoots? ... It’s been a long time since I’ve looked at that code.
                      Standard Disclaimer
                      I could be totally wrong.
                      • 7455
                      • 2,204 Posts
                      List sections is stiil eto and has not the functions that ListGlobal has like multiple styles and the in menu option
                      another option would be a seperate snippet that wil generate any of the nodes you give in the call if thats the one he finds first.
                      like this

                      if I have 3 folders in the root (1,2,3) and they all have 2 children (1 hase 4,5 2 hase 6,7 3 hase 8,9) those children all have a set of children by dem selfs.

                      What i like to set the snippet to give me one of the folloing id’s depending on what page I curently am: 4,5,6,7,8,9

                      I hope this explains it.

                      Dimmy
                        follow me on twitter: @dimmy01