[Mediawiki-l] Category page name sort logic.

Rob Church robchur at gmail.com
Wed Aug 29 20:10:13 UTC 2007

On 29/08/2007, Michael Daly <michaeldaly at kayakwiki.org> 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?

It doesn't; it sorts according to the category sort key as defined by
the categorisation, e.g.

[[Category:Foo|Adams, John]]

This is often set using {{DEFAULTSORT}}, which is handy if you've got
an article about a person, and a lot of categories.

Rob Church

More information about the MediaWiki-l mailing list