Monahon, Peter B. wrote:
Hi MediaWiki folk,
Could anyone kindly direct me to a solution to empower MediaWiki (code / variables / MySQL?) to show articles titles in lists sorted by numeric value, not text value, so that [[700]] comes before [[1800]], and so that [[1801.1]] comes AFTER [[1801]]?
Right now, after importing legacy documents, THIS is the display sort order (example):
[[1800]] [[1801.1]] [[1801]] [[700]]
Rather then the preferred (original example):
[[700]] [[1800]] [[1801]] [[1801.1]]
Is this a MySQL database quirk, or something selectable in PHP, even if requiring an enhancement? Or, has no one addressed this "sort by numeric value, not text value" challenge yet?
As always, I've searched MediaWiki.org and the web to no avail. There's info about adding alphabetical sort functions within lists and tables, but nothing about sorting article name lists by numerical value instead of the default text value.
If you're talking about showing them sorted *on a category* you can make it sorted by a different key than the article name. sO to have 700 sorted by 0700 instead, you'd add it to the category with [[Category:Numbers|0700]] To avoid adding the name to each category, use the DEFAULTSORT magic word.