Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

RC 2.99 Cool & New Category Sort Order

Quote Reply
RC 2.99 Cool & New Category Sort Order
Hello,
I currently have the New and Cool pages grouped and sorted by category, in the Setup - Build Options for build_sort_order_cool I have Title. The problem is that the sort seems to be by the Category table 'Full_Name' , but I want it to sort simply bythe Category table 'Name'. I am using the 2.99 Release Candidate. Any suggestions?
George
Quote Reply
Re: [macbethgr] RC 2.99 Cool & New Category Sort Order In reply to
The "build_sort_order_cool" is for your link order.

The "build_category_sort" is used to sort the category listings and is set to "Name" by default *but* this is only for building the home page and category pages, *not* for new and cool.

The category order for new and cool can't be changed by a build setting unfortunately - it's hard coded. Probably because Full_Name makes more sense for New and Cool pages just like it does for a search page i.e. these results span the whole database, not just results under a category and so Name probably didn't make a suitable option. Anyway, that besides the point.

Hope that was useful anyway.



Regards,
Peter Puglisi
www.ausfreedom.com
Ultimate Freedom is our game.
Quote Reply
Re: [rocco] RC 2.99 Cool & New Category Sort Order In reply to
Thanks for the info.... Do you know where it is hard coded? For my directory Full_Name does not make more sense for New and Cool pages since I only display the 'Name' of the directory on those pages and it appears to be out of order when it is veiwed. I also do not use search so that would not be an issue.
Thanks,
George
Quote Reply
Re: [macbethgr] RC 2.99 Cool & New Category Sort Order In reply to
OK,
Here is what I had to do to change this:

in the sub build_new section of Build.pm I found the following line:

my %names = $catlink->select('LinkID', 'Full_Name', { LinkID => [map $_->{ID}, @$results] })->fetchall_list;

I changed it to:

my %names = $catlink->select('LinkID', 'Name', { LinkID => [map $_->{ID}, @$results] })->fetchall_list;

in the sub build_cool section of Build.pm I found the following line:

my %names = $catlink->select(LinkID => Full_Name => { LinkID => [map $_->{ID}, @$results] })->fetchall_list;

I changed it to:

my %names = $catlink->select(LinkID => Name => { LinkID => [map $_->{ID}, @$results] })->fetchall_list;

I am aware that any updates could whipe out these changes, so I copied the file to a local drive so I can make the changes again if needed. I wish there were an easier way to do this, but I have to sort the categories on New and Cool by Name, not Full_Name.

George
Quote Reply
Re: [macbethgr] RC 2.99 Cool & New Category Sort Order In reply to
Most of the time copying files from older version on a newer version would break many things. That has been our experience during the course of big testing... so take care...

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] RC 2.99 Cool & New Category Sort Order In reply to
Thanks for the reminder and I agree, I saved the file locally so I can reference the lines I changed, not to copy the file over a new one. I would prefer to do this with a global, but cannot figure out how.
George