Difference between revisions of "Help:Default Sorting"
Line 1: | Line 1: | ||
This page has been edited from Wikipedia. | This page has been edited from Wikipedia. | ||
− | == | + | == Setting a default sort key == |
<nowiki> | <nowiki> | ||
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.</nowiki> | 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.</nowiki> | ||
− | |||
− | Even more importantly, pages about a person, such as , would be alphabetized by the person's first rather than last name. | + | 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. <nowiki> To solve this problem simply write {{DEFAULTSORT: Sex Wars, 1970s to 1980s}} above the categories listed on that page. </nowiki> |
+ | |||
+ | |||
+ | Even more importantly, pages about a person, such as [[George Eighmey]], would be alphabetized by the person's first rather than last name. <nowiki>To solve this problem write {{DEFAULTSORT:Eighmey, George}}</nowiki> above the categories listed on that page. | ||
== Setting a default sort key == | == 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 [[Category:Ford| Ford Motor Company]] (note the space) or [[Category:Ford|*Ford Motor Company]] 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 {{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 [[Category:Polyhedra|~Polyhedra templates]]. | 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 [[Category:Ford| Ford Motor Company]] (note the space) or [[Category:Ford|*Ford Motor Company]] 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 {{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 [[Category:Polyhedra|~Polyhedra templates]]. | ||
</nowiki> | </nowiki> |
Revision as of 17:23, 2 August 2008
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>