On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • I know how to sort my files that I list, but I am not finding anything for sorting directories. I am trying to setup a list of archives. I want to be able to list the directories year by year. No matter what I try, the list seems to be random and out of order. The files within the directories are good to go, just not the directories.

    Thanks in advance.
    • I have the same issue - did you manage to find a solution?
      • Unfortunately, no. I tried everything and gave up. I was hoping for a fix via an update by now, but I still can't get the directories to sort. It seems like a no-brainer of a feature to have for the snippet.
        • That was not what I was hoping to hear!

          It is bizarre..i just can't work out why its not working...it doesn't appear to be a random order because when I delete some and re upload them they go back to the original area. Very strange...and really annoying!
          • Yes, very annoying. I'll post back once I find a solution, if that ever happens.
            • found a solution that seems to work for me.....

              there is no sort on the directories as far as i can see

              in the snippet file i added


              just before

              foreach ($directories as $directory) {

              around line 230 i think

              worked for me

              • Thank you SO much for posting that. Incredible that this is 4 years ago and the code package still doesn't have this simple fix!