Folders sorting issue.

Home \ forums/topic \ Folders sorting issue.

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #181
    marcin
    Participant

    Hi,

    sorting works on files only. I need to sort folders. How to do it ?

    Regards,

    Marcin

    #1300
    Michael Gilkes
    Keymaster

    @Marcin. Currently the plugin does not facilitate sorting of the folders. If you want to have that feature, then you have to edit the easyfolderlistingpro.php file. There are two instances in which JFolder::folders is called to get the folder list. What you need to do is to add your own sorting function to the class, and make that sorting function sort the list that you receive after calling JFolder::folders. I think the two functions that you will find the JFolder::folders call is customListFolderTree and formatListHandleSubfolders.

    Hope this helps.

    Feel free to share your solution with others once you get it working.

    #1301
    alfred
    Participant

    Basically I just needed the order to be reversed, so I added the following code at line 789 or so in the easyfolderlistingpro.php:

    $folders = array_reverse($folders);

    nothing fancy, but it did the trick for my purpose.

    #1302
    SorokinS
    Participant

    alfred, thank you!

    Works.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Folders sorting issue.’ is closed to new replies.