We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7045
    • 225 Posts
    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.
      • 24676
      • 60 Posts
      I have the same issue - did you manage to find a solution?
        • 7045
        • 225 Posts
        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.
          • 24676
          • 60 Posts
          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!
            • 7045
            • 225 Posts
            Yes, very annoying. I'll post back once I find a solution, if that ever happens.
              • 24676
              • 60 Posts
              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

              sort($directories);

              just before

              foreach ($directories as $directory) {

              around line 230 i think

              worked for me

                • 39092
                • 9 Posts
                bluesparkweb Reply #7, 7 years ago
                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!