Administering a Joomla backend I always got annoyed that the default ordering while listing articles is set to “ID descending”. Who in the world needs this?! Walking through the config I did not find an option to change this behaviour. So I needed to manually hack the code. There is a simple function that is obviously responsible for the sort order. You can also find that the default ordering criteria is set to a.id
and desc
. So I changed the value from id
to modified
and voila articles in the backend are now sorted by last modification. Here is the complete patch:
--- administrator/components/com_content/models/articles.php.bak 2021-09-08 06:38:33.159289807 +0000
+++ administrator/components/com_content/models/articles.php 2021-09-08 06:50:16.672555653 +0000
@@ -78,7 +78,7 @@ class ContentModelArticles extends JMode
*
* @since 1.6
*/
- protected function populateState($ordering = 'a.id', $direction = 'desc')
+ protected function populateState($ordering = 'a.modified', $direction = 'desc')
{
$app = JFactory::getApplication();
I wonder if and when someone puts that into an upstream patch and makes it configurable in the backend.