Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Sort order on homepage

Quote Reply
Sort order 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. 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 be a pretty random.

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 on homepage In reply to
Are you using Links SQL or Links 2.0??? If you are using the former, then you need post questions like this in the Links SQL Discussion Forum.

The variable you mentioned ($LINKS{build_sort_order_category}) is used to sort LINKS in the category pages and does not sort the categories. Have you tried searching for Category sort in the Links SQL Discussion Forum????

Regards,

Eliot Lee