How to Change the Default Sort Order of the Articles in Joomla’s Backend

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
User avatar
Chacapamac
Joomla! Guru
Joomla! Guru
Posts: 998
Joined: Wed Feb 20, 2008 6:50 am
Location: Canada, Montreal
Contact:

How to Change the Default Sort Order of the Articles in Joomla’s Backend

Post by Chacapamac » Sat Nov 14, 2020 8:22 pm

When first opening the Article manager, I like to have the ordering by default to be “Date Modified Ascending”.

For me it make a lot of sense as you people working on article can reach the last article they where working on.
Can God help us?
Marketing, SEO, Web development - Powered by Joomla!
http://www.grafcomm.ca/

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 10690
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: How to Change the Default Sort Order of the Articles in Joomla’s Backend

Post by sozzled » Sat Nov 14, 2020 8:31 pm

Several topics that discuss this (in no particular order):Is there something there that may help?
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
Chacapamac
Joomla! Guru
Joomla! Guru
Posts: 998
Joined: Wed Feb 20, 2008 6:50 am
Location: Canada, Montreal
Contact:

Re: How to Change the Default Sort Order of the Articles in Joomla’s Backend

Post by Chacapamac » Sun Nov 15, 2020 12:24 am

Thank Sozzled:

I use your link —> viewtopic.php?f=624&t=827035

Sadly it seem that you cant make an override but you need to hack the file:
—> administrator/components/com_content/models/articles.php

On that post the instruction are :

Code: Select all

 parent::populateState('a.title', 'asc');
-------------- to:

Code: Select all

parent::populateState('a.created', 'desc');
The actual Joomla 3.9.22 articles.php code is different:

On line 133 /134 the code is actually;

Code: Select all

// List state information.
		parent::populateState($ordering, $direction);
The 2 variables ($ordering, $direction)) are define on line 81:

Code: Select all

protected function populateState($ordering = 'a.id', $direction = 'desc')
I change that line for:

Code: Select all

protected function populateState($ordering = 'a.modified', $direction = 'desc')
It seem to work, article in construction are in the top ordering and ordering in other way seem to work, even ID Descending ordering work ...

• One thing I’m not sure of is that, when you enter the Articles administration window even if the ordering of the article show the last modified article up, the “Ordering button” say “ID Descending” (the original value)???

THat’s a mystery for me ?

I don’t understand why Joomla default is NOT the most recent modifications on top or Date Modified descending. It will make lot of sens for site administrators/editors as you can retrieve the article you where working on right when you go in the article administration.

It’s even more important when a web site is in construction and you have intense edition of articles
Can God help us?
Marketing, SEO, Web development - Powered by Joomla!
http://www.grafcomm.ca/

User avatar
Chacapamac
Joomla! Guru
Joomla! Guru
Posts: 998
Joined: Wed Feb 20, 2008 6:50 am
Location: Canada, Montreal
Contact:

Re: How to Change the Default Sort Order of the Articles in Joomla’s Backend

Post by Chacapamac » Thu Jun 17, 2021 5:01 pm

What a shame that you cannot modified the “by default” order of the articles.

Anyway the actual default order (by ID) is mostly useless for 99% of the people and use rarely. Why keeping it like that???
Can God help us?
Marketing, SEO, Web development - Powered by Joomla!
http://www.grafcomm.ca/

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12166
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: How to Change the Default Sort Order of the Articles in Joomla’s Backend

Post by brian » Thu Jun 17, 2021 6:41 pm

If I remember correctly it is a performance issue.

Order by ID descending (which is the default) ensures that the most recently created articles are always at the top.
Anyway the actual default order (by ID) is mostly useless for 99% of the people and use rarely. Why keeping it like that???
If that was actually correct don't you think that something would have been done about it.

And yes I would like the option to set the default myself
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12166
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: How to Change the Default Sort Order of the Articles in Joomla’s Backend

Post by brian » Thu Jun 17, 2021 6:43 pm

You might also find it useful to add an admin module for latest articles (see https://brian.teeman.net/joomla/871-man ... ld-be-easy)
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
Chacapamac
Joomla! Guru
Joomla! Guru
Posts: 998
Joined: Wed Feb 20, 2008 6:50 am
Location: Canada, Montreal
Contact:

Re: How to Change the Default Sort Order of the Articles in Joomla’s Backend

Post by Chacapamac » Fri Jun 18, 2021 2:37 pm

I understand the ID now, by default the latest created article, make somewhat sense when building a website. And yes also the “Recently Added Articles” that I use with the ”Recently modified” option do the job. For sure, the option will be great, maybe a feature for a next version?
Thanks Brian & Good Day !
Can God help us?
Marketing, SEO, Web development - Powered by Joomla!
http://www.grafcomm.ca/


Post Reply

Return to “Administration Joomla! 3.x”