Page 1 of 1

Sort category view in News Module

Posted: Mon Nov 30, 2009 10:36 pm
by davidjon
Hey Guys,

Once again online on this forum for the next question.

Am I right that the sortby="" function in the News tag doesnt effect once the action="browsecat"?

Is there a way to fix this? I would like my categories to be shown on the page in alphabetical order. I saw something on this forum to change some stuff in the action.browsecat.php.

Code: Select all

$query .= ' ORDER by hierarchy';


in to this .

Code: Select all

$query .= ' ORDER by news_category_name ASC';
does this effect my hierarchy? because i now have some parent categories with child categories! i dont want to ruin this before i know for sure that this would work for me.

the pages i want to have alphabetical are these.

http://da.stylique.nl/onderwijs/vo/
http://da.stylique.nl/onderwijs/bo/

this is what my news hierarchy looks like.
Image

hope someone can help me...

Re: Sort category view in News Module

Posted: Fri Jan 08, 2010 9:35 pm
by caciavar
I've attempted to apply this fix however it does nothing for the category list on the front end. I am shocked that this functionality is not built-in by default. What's the use of having a category list of news that is alphabetically out of order?
Am I right that the sortby="" function in the News tag doesnt effect once the action="browsecat"?
If you're trying to do the same thing that I am, then no, this does not achieve the intended result.

Re: Sort category view in News Module

Posted: Fri Jan 08, 2010 11:53 pm
by Nullig
What I do is change that line in the action.browsecat.php file to this:

Code: Select all

$query .= ' ORDER by long_name';
when I need that functionality. However, remember that you may need to make that change to the file on future updates/upgrades.

Nullig

[Solved] Re: Sort category view in News Module

Posted: Mon Jan 11, 2010 5:23 pm
by caciavar
Impressive! Works great. Very much appreciated.

Re: Sort category view in News Module

Posted: Tue Sep 21, 2010 2:36 pm
by beherenow_uk
Hi all,
Nullig wrote: What I do is change that line in the action.browsecat.php file to this:

Code: Select all

$query .= ' ORDER by long_name';
when I need that functionality. However, remember that you may need to make that change to the file on future updates/upgrades.

Nullig
...I'm using News 2.10.6 - but can't find this line in the aforementioned file. Has it moved elsewhere in the latest version(s)?

Is this still the best way to order categories with the browse categories function?

thanks,

Karl.

Re: Sort category view in News Module

Posted: Tue Sep 21, 2010 5:22 pm
by Nullig
I don't think you need this any more - I think it sorts properly.

Nullig