Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Sort the categories themselves

Quote Reply
Sort the categories themselves
Hope to have solved it for myself.

See Line 626 of build.pm

Code:
# Separate the output.
# $cat_db->select_options ("ORDER BY $CFG->{build_category_sort}") if ($CFG->{build_category_sort});
$cat_db->select_options ("ORDER BY CatSort DESC"); ***


What i dont understand is why Alex uses build_category_sort here for the select.
It only takes the cats with an order but it has nothing to do with the sort of the links.
Isnīt it so?
With this there could be a litte change for the next version with a new $CFG like
build_catsort.
Quote Reply
Re: [Robert] Sort the categories themselves In reply to
The links themselves are sorted by build_sort_order_category, which you can set in "Setup ->Build Options". You will find it used in Build.pm, around line 547.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Sort the categories themselves In reply to
Thank you, Yogi. ;-) I know that, but maybe i dont know how the explain my thoughts in english.
My problem was to sort the categories not the links. To solve that i looked over the source and found the right place to change it.
But i wonder why Alex used the same order for the select than that for the links.
While i order my links with 3 special fields this order makes no sense for the cats, cause they dont have thiese fields.
At this place should be another cfg and the possibility to change it at the admin.
I have fixed this for me, but asked if i dont see something important.

Robert
Quote Reply
Re: [Robert] Sort the categories themselves In reply to
I don't know if I completely misunderstand you but in the admin you have two options:

build_sort_order_category for sorting links
build_category_sort for sorting categories

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Sort the categories themselves In reply to
Damn. You are right. Thank you.
Havenīt seen it cause its not next to the other ones.
You know the story of that men, cant see the wood,
while seeing to many trees ;-)

Robert