Jun 17
2009

Sorting Articles by Latest First in Joomla 1.5.11

Posted by Georg in Untagged 

Sometimes you really want your latest posted article to show up on top of the stack on your fancy dandy groovy Joomla site. Quite a normal desire, I might add...

An always excellent start is to go in your Joomla backend > Menu manager > pick up your menu > edit menu item > parameters [advanced] > Category order / Primary order > Most recent first; apply and check it out. If not properly sorting your articles in the frontend blog, then keep reading...

It happened that in Joomla 1.5.11 [so far as I've been informed] there's a lil bug forcing articles sorting on "order" instead of "latest". And here's the out commenting hack at hand:

Sftp in to path/whatever/components/com_content/models/category.php and out comment the lines as indicated below:

      if ($filter_order && $filter_order_Dir)
{
$orderby .= $filter_order .' '. $filter_order_Dir.', ';
}
// elseif($filter_order == '' && $filter_order_Dir == '')
// {
// $filter_order='a.ordering';
// $filter_order_Dir='ASC';
// $orderby .= $filter_order .' '. $filter_order_Dir.', ';
// }

If you've downloaded J1.5.x past this moment [see the date of this post] then just ignore it.

Comments (1)Add Comment

Write comment

busy

Google News

Google News
Copyright © 2010 Joomla Problem Solvers. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.
JoomlaPeople Rss Feed