Help:Default Sorting

From OutHistory
Revision as of 17:23, 2 August 2008 by LaurenGutterman (talk | contribs)
Jump to navigationJump to search

This page has been edited from Wikipedia.

Setting a default sort key

A page's default sort key, {{DEFAULTSORT}}, establishes the way that page will be alphabetized on the category pages to which it is linked. If a default sort ket is not specified, the default sort key is the article title. It is therefore not technically necessary to provide a {{DEFAULTSORT}} value if the article title is the desired default sort key.


In some cases, alphabetizing an article by its title does not make sense. For example, an article such as The Sex Wars, 1970s to 1980s would automatically be alphabetized on its category pages under T rather than S. To solve this problem simply write {{DEFAULTSORT: Sex Wars, 1970s to 1980s}} above the categories listed on that page.


Even more importantly, pages about a person, such as George Eighmey, would be alphabetized by the person's first rather than last name. To solve this problem write {{DEFAULTSORT:Eighmey, George}} above the categories listed on that page.


Setting a default sort key

It is possible to force an article or subcategory to the top of the list by using a non-alphanumeric character as the first after the pipe. For example, using (note the space) or would force that article to be displayed before all the others. Many editors feel that the space character produces the best aesthetic appearance when the category is displayed. Using a space or asterisk after the pipe is the customary way to categorize an article in a category with the same name, indicating that the article is the main topic article for that specific category. For an example, see Category:Suspension bridges. Using Template:Catmore may be preferable - no consensus has been established yet. To list at the end (after z) of a category, the sort key ~ can be used. </nowiki>