Help:Creating and Adding to Categories
Contents |
General overview
A category is a list page which serves to classify topics; for example, the Category:MLB History is meant to hold the individual topics, such as National Baseball Hall of Fame and World Series. If you are new to ArmchairGM, and you have just selected the Category:MLB History for reading you may have been surprised to have seen two lists:
- Subcategories of Category:MLB History, such as Category:New York Mets History, and
- Articles, such as the ArmchairGM article on World Series.
- The first list contains more specialized categories where you can find detailed articles on that specific subcategory. For example, Category: Detroit Tigers History is a subcategory within Category:MLB History and contains the article Detroit Tigers Team Records. There are often multiple levels of categories and subcategories.
- When you are interested in a general article, look in the second list (#2 above) for an article title. If you are interested in more specific articles, find the desired subcategory and search there.
When you are reading an article and want to find the general category to explore, look at the bottom of that article for a "Categories:" box listing all the categories to which the topic of the page belongs.
Adding your page to categories
To add a page to a category, insert the link
[[Category:category name]]
to that page. For example, the category Category:NBA Players includes all NBA players, past and present. To add LeBron James to this list, you would go to LeBron James's page and insert the link
[[Category:NBA Players]] into it (yes, include the double brackets).
As another example, to include an Opinion you wrote into category Category:MLB Opinions you would insert the link
[[Category:MLB Opinions]] into your opinion page.
The link to the opinion will then be included in the category page, and a link to the category will be included on the bottom of the opinion page. Pages can be included in more than one category by adding multiple category tags. Category tags may be placed anywhere in the article, although they are typically added to the end of the article.
Category page
A category page consists of:
- editable text
- list of subcategories; how many there are is also displayed; if there are no subcategories the header and count are not shown.
- list of pages in the category, excluding subcategories and images; the number of items in this list is called the number of articles; if there are none the header is shown anyway, and "There are 0 articles in this category."
To create a category page, you must add a colon in front of the Category tag when you set up the page-creation link, to prevent the software from thinking you merely want to add the page you are working from to the category:
[[:Category:Category name]]
Placing the above text on working page will create the link you can use to edit your category page.
Creating subcategories
Creating subcategories takes only a few additional steps. Adding a category tag to a category page makes the edited category a subcategory of the category specified in the tag.
First create a new category page for the subcategory the same way you would make a regular category. For example, create [[Category:Atlanta Falcons Players]].
Then go to the newly created category page and edit it. Add the category tag for the parent category (e.g. [[Category:NFL Players]]) to the page.
In this example, the Atlanta Falcons Players category would then be a subcategory of the NFL Players category.
Order of the lists; setting sort keys
If you want an item in a category to be positioned in a certain order, based on an alternative name (sort key) for that item, then this can be specified in the category tag that places the item in the list:
[[Category:category name|sort key]]
For example to add a page called Jose Reyes to the category "New York Mets Players" and have the article sorted by "Reyes, Jose", you would type "[[Category:New York Mets Players|Reyes, Jose]]" in Jose Reyes's page.
Although this is like the syntax for a piped link (and in an edit summary it is interpreted like one), there is a clear difference: the second term in the piped link is an alternative term for the first one, while the sort key is an alternative name for the page in which the tag occurs. Also, a piped link influences the rendering of the page itself, while a sort key affects the rendering of another page.
The displayed name is not changed, and, unfortunately, only visible on the edit pages of the members of the category. An explanation of the sort key system used can be useful on the editable part of a category page.
The sort key system should be obvious, otherwise the order seems random and items are hard to find. The system should either be consistently applied to all members of a category, or be such that the listings of members on which it is applied fit in well within the list of members for which no sort key is used. The latter is advisable for large, growing categories with many contributors.
A common system is starting with the last name, then a comma and a space, and then the first name; note that any additions such as "Jr." should come at the end, otherwise the entry would come before the same without the addition, because a space comes before a comma.
Links to categories
You can create a link to a category page without adding the page to that category by using a colon before the word Category. Example: [[:Category:MLB Players]] appears as Category:MLB Players.
Existing categories
You can see currently used categories at Special:Categories. This list is quite long though so it's not recommended to browse through it when searching for a category.
