- Forum||Hilfe & Support
- /
- KISS Support Forum
- /
- International Help Forum
- /
- Sub Categories Do Not Save In Order In Overview
Sub Categories Do Not Save In Order In Overview
- DocChicago
- Offline
- KISS Programmer-in-Chief
As the categories are sorted in a special way (the tree structure), they come sorted by name out of the database but are then processed by the tree routine, where the subcategories are forced to be displayed under their appropriate parent categories.
The only way to avoid this is to declare all categories as main categories without subcategories.
Otherwise a change in the code which organizes the tree structure would be necessary. This code should be replaced by a code which keeps the sort coming from the database and builds a regular select box rather than a tree stucture select box. But this would be a major affair.
Ob ein Glas halb voll oder halb leer ist, ist mir egal. Hauptsache meine Zähne passen rein.
No matter whether a glass is half full or half empty - as long as my teeth fit in.
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
Hi Doc
I did as you said,replaced all the
$query .=\" ORDER BY pid, ordering, cat_name\";
Change to
Code:
$query .=\" ORDER BY cat_name\";
Still No Luck I am Afraid,have you got any more ideas on how to fix this.
Thanks Jock
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- DocChicago
- Offline
- KISS Programmer-in-Chief
You may change all occurances of this code. However, the tree structure will be kept. Within the tree, the categories are sorted alphabetically.
To avoid a tree structure, define all categories as main category - no subcategories.
Ob ein Glas halb voll oder halb leer ist, ist mir egal. Hauptsache meine Zähne passen rein.
No matter whether a glass is half full or half empty - as long as my teeth fit in.
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
Hi Doc,
Had a look at the ksadvertiser.php file
There are several instances of this script
$query .=\" ORDER BY pid, ordering, cat_name\";
which line do i replace
Many Thanks
Jock
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- DocChicago
- Offline
- KISS Programmer-in-Chief
Hi Jock,
I did not try out yet whether it works, but you could try to change the code the following way:
Old
$query .=\" ORDER BY pid, ordering, cat_name\";
$query .=\" ORDER BY cat_name\";
This will destroy the tree structure, but maybe the categories will be displayed in alphabetical order. If not, restore the old code.
Ob ein Glas halb voll oder halb leer ist, ist mir egal. Hauptsache meine Zähne passen rein.
No matter whether a glass is half full or half empty - as long as my teeth fit in.
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
Hi Doc,
I dont know anything about PHP all i want to do is to be able to have EVERYTHING categories and subcategories in ALPHABETAICAL order can this be done
Many Thanks
Jock
Bitte Anmelden oder Registrieren um der Konversation beizutreten.