[Mediawiki-l] How to get article titles sorted by numeric value, not text value?

David Gerard dgerard at gmail.com
Fri Oct 5 21:43:25 UTC 2007


On 05/10/2007, Jim Laurino <wycan.y.jimlaur at dfgh.net> wrote:

> To do this you need to know how many digits are allowed
> on both sides of the decimal point, which is hard to generalize.
> No one is surprised any more by a zip code such as 02139,
> but if the modified title is too strange, you could probably
> find a way to use the modified title only for sorting
> and let users see the titles the way they are used to.


Ooh, this could work well. See [[Template:Lowercase]] on en:wp:

http://en.wikipedia.org/wiki/Template:Lowercase

This uses the magic word {{DISPLAYTITLE}}. The code is:

{{DISPLAYTITLE:{{#if:{{NAMESPACE}}|{{NAMESPACE}}:|}}{{lcfirst:{{PAGENAME}}}}}}

So you'll need template parser extensions as well.


- d.



More information about the MediaWiki-l mailing list