Last modified: 2012-04-15 11:18:32 UTC
On wikibooks, we have categories for books. One of the issues with this is that when categorizing either books in namespaces like "Cookbook:Recipe name" or books with subpages like "Calculus/Vectors" users must add a sort key (or the special blank one) to every single module in the entire book to get them to sort properly . This is repetitive and error prone; consider that some cookbook pages have 7 or more categories. There should be a way to mark the category page with a default sort key which would be inherited by all the pages added to it provided they did not have an overriding sort key. For example, a category could have __SORTPAGENAME__ added to it and the namespace would be ignored when sorting ("Cookbook:Recipe name" sorted as "Recipe name"), or it could have __SORTSUBPAGENAME__ and the prefix would be ignored ("Calculus/Vectors" sorted as "Vectors").
Many-many templates contain the "ugly" {{PAGENAME}} variable to avoid sorting by the namespace name. This is error prone (can be acidentally omitted very easily) and ugly.
I also request this feature but need another sort-criteria "__SORTPAGEAGE__" to sort pages by their age, when they where created. The german wikibooks uses a special sortkey, to keep track of new wikibook-candidates. They will be listed in a special category until a few month passed. They are sorted by date of creation, Books listed first are oldest. After beeing a candidate, they will be deleted or they aquire book state. http://de.wikibooks.org/wiki/Kategorie:Wikibooks:QM:Buchkandidat if not possible, i request a variable {{CREATIONTIMESTAMP}} which returns a timestamp formatted like {{CURRENTTIMESTAMP}} containing the timestamp of the creation of a page.
I agree that this would be useful, time-saving, and it would make categories more useful. It would save every single page from having to resolve the {{PAGENAME}} variable, for every single category for which it is a member.
Note that English wikibooks now uses the Book/SubPage convention for indidivual books, not Namespace-like things like Book:. My proposal would be to have a syntax like [[Category:Foo/]] where the slash indicates that we should use the pagename as the sorting key, (so S for SubPage, not B for Book)
Maybe the Sortcriteria should be optional too, a defaultvalue and a force value. [[Category:Foo]] May indicate to use default sort, which is specified on Category Page. [[Category:Foo|A Sortvalue]] Forced to sort this Page equal to "A Sortvalue", which will be found under "A". This, would be easier for the migration process into an improved Category-System. So the Namingconvention might not be a big problem. Is there a Syntax Proposal for this improved Category system ?
Both of the last comments have missed the point. The point is to change the sort method ON THE CATEGORY PAGE ITSELF, so we don't have to resort to silly tricks on every member of the category. Also, the wikibooks Cookbook does have a namespace, so this is still an issue. And Maxim's last idea is what is already implemented.
I mean, the system should support both styles. When the default mode is used, ([[Category:Foo]]) the Sortkey should be used from the Category page, but when a Sortvalue is given, this should be used instead. The Defaultkey - whether Subpage, Pagename, fullpagename, Pageage or anythin else should only be applied, if no special Sortvalue is given. I hope this comment is more precise.
Fixed in SVN trunk, r38992. Set the switch $wgCategoryPrefixedDefaultSortkey to false to get a sane default sortkey. However, that switch is currently set to true on wikimedia wikis.
*** Bug 12351 has been marked as a duplicate of this bug. ***
This was reverted in r70416.