Configurable default sort order in the Explorer?
See original GitHub issueConsidering that the Explorer represents the contents and layout of the main site menu, the fact that the default sort order is locked as -latest_revision_created_at
is frustrating. It means that you require an extra step (clicking “Enable ordering of child pages”) to see the Menu layout. This is not good UX for site editors who aren’t intimately familiar with Wagtail’s admin UI.
I’d be happy to implement this myself, but I don’t really see anywhere in the admin UI where one can set “site configuration”. Though I suppose it could be useful to have a default that’s tied to a user’s role (users who don’t have permission to edit the menu don’t need this sort order by default), so it could go in the Group editor.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:1
- Comments:30 (16 by maintainers)
Top Results From Across the Web
Configure the report's default sort - Calabrio Help Center
This control only sets the default sorting direction. In a report with a table view type, select the Sorting tab in the Question...
Read more >How do I change the default sort order on Windows Explorer ...
Select View tab, Apply to all folders. This will always sort folders for that document type by date since it is the first...
Read more >Is there a way to change the sort order of Windows Explorer?
Click Start, click Run, type regedit, and then click OK. · Use one of the following methods, as appropriate for your situation: ·...
Read more >How to alter File Explorer's default sort | TechRepublic
After doing some research, I discovered that Microsoft did indeed deliberately change the default sorting algorithm, starting with Windows XP. I ...
Read more >Default Sort Order in the Open Dialog Box - Word Ribbon Tips
When Leo displays the Open dialog box (to open an existing document), Word always displays the available documents in alphabetical order, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m in favour of having the parent page’s model specify the ordering, and in fact I’d take it one step further: specifying an order should override the manual (menu) ordering. In other words, it’s not just an admin display preference: it governs the actual ordering of pages within the database (as defined by Treebeard’s
path
field), and newly created (or renamed) pages would be inserted at their appropriate position.I believe this would negate the need for a user preference: the explorer would default to showing each page listing in that section’s ‘native’ ordering, whether that’s title order, date order, or manually defined. The problem we’ve faced up to now is that the manual sortorder naturally degenerates into randomness unless there’s someone actively managing it - which won’t be the case for a large news / blog / people listing - and so it’s unusable as a default ordering in the explorer, leading us to adopt title or date as the ‘next best’ option. (In turn, this leads to the confusion where people set a manual page ordering and think their changes have been lost as soon as they return to the ‘regular’ explorer view.) By making it possible to tie the menu order to title or date, this change would make the menu ordering relevant and usable again.
Wouldn’t it be better to have a possibility to set the default sorting in the page model class, e.g. something like the following?
Nowadays I run several wagtail sites that have different sections for which I would prefer different sorting settings. E.g. in sections with articles you usually want to sort by -last_created_at, but for sections like staff you’d prefer sorting by title etc.