Foren / Cotonti / Core Labs / Archive / Set categories sorting

by catpath or category title

musiconly
#1 9. September 2009, 16:57
If you visit downloads, you will notice that categories aren't sorted by their NAMES but by CATEGORY PATHS (9.1.2).

Can we add an option in core (like enable comments/ratings) "Sort by Title: YES NO"?
I'm not talking about sorting PAGES inside categories, I'm talking about sorting the CATEGORIES.



esclkm
#2 9. September 2009, 18:39
may be it is good idea
littledev.ru - мой маленький зарождающийся блог о котонти.
снижение стоимости программирования и снижение стоимости производства разные вещи. Первое можно скорее сравнить с раздачей работникам дешевых инструментов, чем со снижением зарплаты
Kilandor
#3 10. September 2009, 16:36
Actually techincally your using Path incorrectly

The way its done is, each number works not only as the path for cat/subcats/etc it works as ordering.

So using 9.1 4x causes those to be sorted by basicly the order they was added I think(as they are pulled out of mysql). You shouldn't use repeated numbers unless you want that to happen, use consecutive numbers, 9.1, 9.2, 9.3 for each one.



This above should give you a good idea of the normal way its done. And you can compare it to here on the site. http://www.cotonti.com/docs/
Sergeich
#4 10. September 2009, 17:09
agree Kilandor
musiconly
#5 10. September 2009, 17:39
The only disadvantage of using repetitive paths (besides wrong sorting) is that you can't have subcategories. For example, if I used 4 times 9.1 path, I can't have 9.1.1 because system doesn't recognize to which 9.1 category it should be added.

The advantage of using repetitive paths is that you get automated sorting of categories in "Admin > Structure of pages" by alphabet, which isn't the case when you're using different paths for different categories. In that case, category sorting really depends on your language skills (how well you know your alphabet).

That's pretty easy when you have 5,10,50 categories. But imagine you have 2000+ categories (Lombi has even more)! This is where you get a headaches. Especially when you're adding 10-20 new categories a day.

Live example:


So how do I feel when I need to add 10 new categories somewhere in between those? Path codes range from 8-12 numbers because of extra space for the upcoming categories.

By using one path code for more categories which I know I won't be needing subcategories, my work is 100 times easier because I know that under path code 9.1 I'm going to place all categories which are starting with the letter A, 9.2 for letter B and so on. I only have to worry about the first letter of the new category, system will do the alphabetical sorting by category code.
Easier way to handle things, right? :)

I know my case is specific ATM, but running large websites on Cotonti shouldn't be a pain in the.. well you know..

So this is why I need them sorted out alphabetically in frontend :)
Kilandor
#6 10. September 2009, 18:02
I'll look into it, there might be an effective way to do it.
Lombi
#7 10. September 2009, 18:51
Should be easily fixed by just adding an extra order by in there?
<a href="http://www.domenlo.com">Surreal Art</a>
Kort
#8 10. September 2009, 21:17
The paths system is very logical & simple to use. How about making an 'autonumbering by code' or 'autonumbering by title' plugin for the '5000+ categories' cases?
SED.by - создание сайтов, разработка плагинов и тем для Котонти
musiconly
#9 11. September 2009, 04:50
# Lombi : Should be easily fixed by just adding an extra order by in there?

Seems like the easiest solution :)