Forum OpenACS Development: Category ordering

Collapse
Posted by Ben Koot on
Hi folks,

I am a great fan of the category package. Yet I am puzzled about the functionality. What's the rationale behind the ordering feature? I don't realy see what it does. Woulnd't it be more effective to offer a simple menue of sort orders. For example A-Z. I can't see how to do this in the current package.

Thnaks

Ben

Collapse
2: Re: Category ordering (response to 1)
Posted by Timo Hentschel on
Mmmm... This might be interesting to have, but be advised that a sort order like "A-Z" would mean that the sort order is not fixed, but heavily dependend on the language code you're using. So, the same category tree viewed in english might be sorted totally different than seeing it in german. Since I wanted fixed sort order numbers in the database to sort by, I did not provide the functionality of your proposed feature, but I will think about how to do this best.
Collapse
3: Re: Category ordering (response to 1)
Posted by Jeff Davis on
I would get rid of the fixed sort order in preference to alphanumeric sorting. You almost certainly want large
trees alphabetical and for small trees it doesn't much
matter.
Collapse
4: Re: Category ordering (response to 1)
Posted by Malte Sussdorff on
Though a default ordering might make sense, we should definitely keep the possibility to override the default sort order. Not only for the reason Timo mentioned (different sorting in different languages), but also because some categories are more often used than others and should therefore appear on top. And the category "Other" should always appear on the bottom at most sites.
Collapse
5: Re: Category ordering (response to 1)
Posted by Jeff Davis on
> different sorting in different languages

That's the biggest problem. As it stands you can't have different sort order by language since sort order is determined by the categories table not in the category_translations table. So if you have en_US and es_ES category labels you can't have them sort differently. I would gladly lose the ability to set a specific sort order if I got alphanumeric localized sorts and also had added categories automatically go in in alphabetical order.