Anonymous
Anonymous asked in Computers & InternetInternetWikipedia · 1 decade ago

Editing a wiki: Alphabetical order...?

I'm working on a category section on a wiki, for all the characters who fit into this section. I want to make the characters' names alphabetized on the list by last name only. (John Smith would come under S). How do I do this?

1 Answer

Relevance
  • 1 decade ago
    Favourite answer

    Assuming you're working on a MediaWiki-based wiki (i.e. one with the same wiki engine that Wikipedia uses) you should be able to use the defaultsort magic word. So, for example, to sort John Smith, I would add the following to the end of the John Smith page:

    {{DEFAULTSORT:Smith, John}}

    This sets the default name, or "sort key" that the software uses to sort pages within a category. This would apply for every category applied to the page.

    If you want to change the sort key for an individual category (and not affect the sorting order for other categories), you can specify the sort key at the same time as you add the category. For example:

    [[Category:People named John|Smith, John]]

    This option overrides the defaultsort magic word, if it's been used.

    Note that the | symbol dividing the category name from the sort key is not a lowercase L or uppercase i, but rather a "pipe" symbol that you can make by pressing shift and \ together on your keyboard. It's relatively important to wiki syntax.

Still have questions? Get answers by asking now.