Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Sort order of Categories on homepage

Quote Reply
Sort order of Categories on homepage
Hi all,

I have looked through the forum on changing the sort order of the category listings on the homepage. They all seem to say that is uses $Links{'build_sort_order_category'} but changing that seems to have no effect on the order of the category listings on the homepage.

Can someone tell me how the categories actually get ordered. I looked in sub build_home_page in nph-build.cgi. There is No "Order by" in the Select statement.

I checked the site_html_print_cat in HTML_Templates and the only sorting function I can find there is foreach $cat (sort @names) - This sorts alphabetically using the Name field of the category.

In nph-build.cgi I tried adding to the select statement Order by Description - No luck
I removed the sort from (sort @names) That seemed to give a random ordering.

So I'm at loss. I don't want to do any special sorting, just sort by some given field in the Category database. Anybody
have any ideas where to look?

Thanks.

Quote Reply
Re: Sort order of Categories on homepage In reply to
the search only returns links in "score" order, unfortunately.

The cateagories order is complicated by the use of alt-links and a bug in the logic that merges the two hashes.

Hopefully this will be fixed in the next release. it's a know, major, bug/problem.

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: Sort order of Categories on homepage In reply to
klangan:

I was having problems with sort order, too. I had a lot of topics like "The Scooby Doo Show" that I wanted alphabetized under "s" (for Scooby) rather than "T" (for The).

Anyway, I changed the field that was sorted to one I did not use (mega_header) and would just put "scoody Doo Show" there, so it alphabetized by that. I am sure you could do the same sort of thing to force the order, too!

If you want to know the exact mod I used, let me know!

Dave

Quote Reply
Re: Sort order of Categories on homepage In reply to
Look at:

http://www.gossamer-threads.com/...=&vc=1#Post95750

I've tried it and it worked.

Quote Reply
Re: Sort order of Categories on homepage In reply to
Wonderful. Just what I needed!