Gossamer Forum
Home : Products : Gossamer Links : Discussions :

New/Cool pages - random category sort?

Quote Reply
New/Cool pages - random category sort?
I have the gb functions turned on for the New and Cool pages, because I want the links grouped by category. However, the categories are sorted, as far as I can tell, completely randomly. For example, the categories on the Cool page right now:

Cast/BtVS/James Marsters - Spike
Misc.
Buffy/Spoilers
Buffy
Foreign/British
etc.

I have build_category_sort set to Priority (a field I added), which works as expected on the Home Page and the Category pages. I thought perhaps this is what was messing up the New/Cool pages (which I expected and want to sort alphabetically, independent of this setting), but it is not. The priorities of the aforementioned categories on the Cool page are:

30
40
0
10
0
etc.

I tried setting build_category_sort to Name, just to see, but I still got the exact same random result.

I realize that I could turn of the gb functions, but I do want the links grouped by category. However, the current method is confusing to viewers and looks rather silly. It seems to me that the categories should be alphabetical.

I searched, and found quite a few people mentioning this problem, but I haven't seen any solutions (aside from "turn the bg functions off").


Solutions, anyone?



Jamie Marie


---------------------
BuffyGuide.com
Quote Reply
Re: New/Cool pages - random category sort? In reply to
Hi,

They are not sorted right now. To do this, you need to edit Build.pm around line 234:

foreach my $name (keys %$output) {

to:

foreach my $name (sort { lc $a cmp lc $b } keys %$output) {

to have it sort alphabetically. Same thing for Cool pages on line 305ish:

foreach my $cat (keys %$grouped_output) {

to:

foreach my $cat (sort { lc $a cmp lc $b } keys %$grouped_output) {

I'll make this change in the next release.

Hope that helps,

Alex

--
Gossamer Threads Inc.