Sort category view in News Module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
davidjon
Forum Members
Forum Members
Posts: 21
Joined: Thu Jul 09, 2009 7:56 pm

Sort category view in News Module

Post 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...
caciavar
Forum Members
Forum Members
Posts: 64
Joined: Wed Feb 11, 2009 6:30 pm
Location: Toronto, Canada

Re: Sort category view in News Module

Post 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.
Thanks,
Chris

Skype: @caciavar
E-mail: info@chrisciavarella.com
Phone: 1-407-243-8048 (US), 1-647-328-0575 (Canada)
Website: http://www.chrisciavarella.com
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: Sort category view in News Module

Post 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
caciavar
Forum Members
Forum Members
Posts: 64
Joined: Wed Feb 11, 2009 6:30 pm
Location: Toronto, Canada

[Solved] Re: Sort category view in News Module

Post by caciavar »

Impressive! Works great. Very much appreciated.
Thanks,
Chris

Skype: @caciavar
E-mail: info@chrisciavarella.com
Phone: 1-407-243-8048 (US), 1-647-328-0575 (Canada)
Website: http://www.chrisciavarella.com
beherenow_uk
Forum Members
Forum Members
Posts: 103
Joined: Fri Nov 28, 2008 11:26 am

Re: Sort category view in News Module

Post 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.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: Sort category view in News Module

Post by Nullig »

I don't think you need this any more - I think it sorts properly.

Nullig
Post Reply

Return to “Modules/Add-Ons”