Default File Manager order?

Hey everyone,

I had a client ask me recently about the order of files displayed in the File Manager in V9.

By default, it sorts the list by name, and you have to click on the column header for Date Modified, twice, to get it to list by the most recently uploaded or updated.

If you then then go elsewhere and return to the file manager page later, this ordering doesn’t persist, and it returns to sorting by name again.

Fortunately I’ve found that there’s a config that can be set manually, concrete.file_manager.sort_column, that defines what the default sort column is (and another for the order).

But I’ve found that it’s not controlled anywhere from the dashboard.

I’m now thinking I should create a pull request to add some control via the dashboard to allow this ordering default to be easily changed.

However, I’m wondering why the file manager is sorted by name in the first place, and whether it actually makes more sense to just set the default ordering to date modified by default. I’m pretty sure earlier versions of Concrete had it this way.

Is there a good reason it’s sorted by name by default?

Completely agree. Trying to find anything in the File Manager is troublesome to say the least. It needs some love with the eyes of a non-expert.

What did you change concrete.file_manager.sort_column to be and did you also change the default sort direction to ‘desc’?

'sort_column' => 'dateModified',
'sort_direction' => 'desc',

I tried that and it didn’t seem to make any difference. What screen gets sorted?

So you would drop into /application/config/concrete.php

<?php

return [
    'file_manager' => [
        'sort_column' => 'dateModified',
        'sort_direction' => 'desc'
    ]
];

And then the main File Manager has this by default:
Screenshot 2025-02-26 at 15.42.45

I think this is a recent config option, I think added in 9.3.6 (or at least from October last year)

2 Likes

There was a general purpose configuration editor in the marketplace. I just had a look and couldn’t find it. perhaps it didn’t make it into v9.

Maybe @mlocati was the developer?

I remember this - having an add-on to do that is great, but in this particular case I don’t think we should need to have to manually edit config files to change the order of the file manager to something more commonly used.

So my question really should be

  • should I do a pull request where this default can be changed with a setting?
  • or, do I propose for changing the default behaviour, with it able to be changed back to name via manual config.

I just can’t envisage the use-case where anyone would be wanting the default to be in name order.

Yep, it was called Handyman (but I wrote it for concrete5 5.6 (or maybeeven later), and I’m pretty sure it’s really outdated.

Unfortunately this also sorts the folders by date and I think the folders are better sorted by name especially if like me you have a site with a lot of folders.

Aww, I changed it in the core (concrete/src/File/Search/ColumnSet/DefaultSet.php) but that didn’t percolate up. I wonder why? Oh well, your concrete.php addition works.

I think my argument here would be that a larger group of users are going to be interested in seeing recently uploaded files by default.

Files and folders could still be sorted by name, just be clicking on the heading title - which is obviously an extra step, but still quite quick.

What this says to me though is that we just should have a dashboard option to change the default, and the argument on what the default should be is sort of a separate point.

2 Likes

@mesuva I agree and the File Manager definitely doesn’t have as good usability as it used to have in v8.

All the time I am clicking Date modified twice just to see the file I just uploaded and now want to set in as an image in the page etc.

Sort can be configured for Advanced Search and presumably made a preset (though I have not used that). A generic file search configuration mechanism is already there.

Is it possible to configure a preset as the default view?

I tried creating a preset, but couldn’t spot a way to make it the default

Completely agree! In addition, if you have a fairly robust file structure and you go to a sub folder to add images, the next time you go back your back at the top level making you click your way to the proper file again. V8 did not do this, but V9 does - it’s a big time waste for productivity.

1 Like

I think the whole thing was designed by someone who a) doesn’t build websites and b) never used the File Manager in previous versions.

My vote is for the default to be sorting by date. ConcreteCMS used to do this. Otherwise, a config in settings would be nice too.

Great suggestion for a dashboard option @mesuva, further to this it would be great to also include a sorting option for the ‘Upload File’ and ‘Move to Folder’ dialogs, currently folders display in the order that they are added, for me, using alpha/numerical order would make more sense as I tend to have clients with a large number of folders added over time.