Page MenuHomePhabricator

Allow setting the default sort key for all categorisations on a page
Closed, ResolvedPublic

Description

Author: peu

Description:
If we could assign a default order to a page, the auto-generated index of any
related category page could use it.

the usage could be
<nowiki>
[[Order:Kohl, Helmut]]
[[Kategorie:Mann|Kohl, Helmut]]
[[Kategorie:Deutscher|Kohl, Helmut]]
[[Kategorie:Bundeskanzler (Deutschland)|Kohl, Helmut]]
</nowiki>

The option of using a default order mechanism would reduce duplicates.
Syntactically the default order (if given) could be overridden by
<nowiki>[[Kategorie:xyz|Name]]</nowiki>

It would be also useful for intersection of categories with (for instance) the
[http://meta.wikimedia.org/wiki/DynamicPageList DynamicPageList]-Extension.


Version: unspecified
Severity: enhancement

Details

Reference
bz5908

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:14 PM
bzimport set Reference to bz5908.

peu wrote:

pardon, the requested usage would be like this:

[[Order:Kohl, Helmut]]

[[Kategorie:Mann]]
[[Kategorie:Deutscher]]
[[Kategorie:Bundeskanzler (Deutschland)]]

and so on

I wish you don't have to repead the similar sort key.

stanley wrote:

This request might be related to bug 5116

robchur wrote:

I assume that where a specific sort key is provided, the "default" would be ignored?

robchur wrote:

Fixed in r18629. Use {{DEFAULTSORT:Something}}.

morten wrote:

DEFAULTSORT is a bad name. It does not signal relationship with categorization in any way (except for users who know the software well and knows what sortkeys are). Could it be changed to something more logical like CATEGORYSORT or the lengthier CATEGORYDEFAULTSORT?

robchur wrote:

We can add whatever aliases are desired, but I'm not going to remove the one we have now, because I know it's in wide use.

I'm not of the opinion that "DEFAULTSORT" is a particularly bad name, but...added "DEFAULTSORTKEY" and "DEFAULTCATEGORYSORT" aliases in r22839.

peu wrote:

(In reply to comment #6)

We can add whatever aliases are desired, but I'm not going to remove the one we
have now, because I know it's in wide use.

I'm not of the opinion that "DEFAULTSORT" is a particularly bad name,
but...added "DEFAULTSORTKEY" and "DEFAULTCATEGORYSORT" aliases in r22839.

If the effect of the default sort key is not restricted to categories I would prefer not to have "CATEGORY" in the key word. Where can I find the code or database structures responsible for having a default sort key? The Links r18629, r22839 seem not to be the full story?

("DEFAULTSORTKEY" seems to be more clear, but "DEFAULTSORT" is shorter.)

robchur wrote:

Sort keys are limited to categories.

peu wrote:

It is stored in categorylinks:cl_sortkey, is it?