Sunday, 19 February 2012 03:53

Joomla! Sort items by date of publication or date of creation

Written by  Administrator
Rate this item
(1 Vote)

Make sure that menu Parameters (Advanced) are set as:

Category Order: No Order by Primary Order Only
Primary Order: Most Recent First

 

Open file .../components/com_content/helpers/query.php.

Change the following, about line 50.

function orderbySecondary($orderby)
{
switch ($orderby)
{
case 'date' :
$orderby = 'a.created';
break;

case 'rdate' :
$orderby = 'a.created DESC';
break;

Change value underlined in:

function orderbySecondary($orderby)
{
switch ($orderby)
{
case 'date' :
$orderby = 'a.publish_up';
break;

case 'rdate' :
$orderby = 'a.publish_up DESC';
break;
Last modified on Sunday, 19 February 2012 04:29
More in this category: « Content Layouts

Leave a comment

Make sure you enter the (*) required information where indicated.
Basic HTML code is allowed.

Site Poll

Joomla! is used for?

Who's Online

We have 28 guests online

SitoMaestro works with ...
Services