[Mediawiki-l] Category page name sort logic.
Platonides
Platonides at gmail.com
Wed Aug 29 20:07:33 UTC 2007
Michael Daly wrote:
> I noticed this on Wikipedia and assume it's a generic MW thing.
>
> In a category of persons, I see the list of articles where some persons
> are listed under the first letter of their first name and others by
> their last name. E.g.:
>
> A
> John Adams
>
> B
> Barney Rubble
>
> I looked at the [[category:..]] statements in the articles and couldn't
> see anything that could explain it. How does it decide whether to use
> first or last name and how does it know it's a name of a person and not
> just a two-word article name?
>
> Mike
You use [[Category:Foo]] to list article X sorted by key X, and
[[Category:Foo|Y]] to have it sorted by key Y.
You can also use {{DEFAULTSORT:Z}} to have categories where no sort key
have been specified sorted by key Z.
That's the method used on [[John Adams]]
http://meta.wikimedia.org/wiki/Magic_word#Miscellany
More information about the MediaWiki-l
mailing list