Help:Category: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
→‎Miscellaneous: The categories to which a page belongs are displayed in a fixed place, depending on the skin (the bottom for Monobook, the upper right corner for Standard),
rearrange a bit
Line 15: Line 15:
For example you could edit <nowiki>[[Category:Soccer]]</nowiki> and add the link <nowiki>[[Category:Sport]]</nowiki>. The Soccer category would then be a sub-category of the Sport category.
For example you could edit <nowiki>[[Category:Soccer]]</nowiki> and add the link <nowiki>[[Category:Sport]]</nowiki>. The Soccer category would then be a sub-category of the Sport category.


==Categories to which a page belongs==
==Miscellaneous==


Pages, including categories, can belong to more than one (other) category. The categories to which a page belongs are displayed in a fixed place, depending on the skin (the bottom for Monobook, the upper right corner for Standard), regardless of where in the wikitext they are specified.
Pages, including categories, can belong to more than one (other) category. The categories to which a page belongs are displayed in a fixed place, depending on the skin (the bottom for Monobook, the upper right corner for Standard), regardless of where in the wikitext they are specified.


== Existing categories ==
A category, even if it contains pages, counts as "non-existing" if it does not contain any additional text. Nevertheless one can see the list of pages it contains. However, links to this category lead to an edit page. Avoiding this complication is an additional reason for entering in a category page at least a link to the main article on the field and a reference to a higher category to which it belongs.

You can see currently used categories for each project with [[Special:Categories]], for Wikipedia [[en:Special:Categories]]. It produces a list of all categories, including those which contain subcategories or pages, but have no additional text. In that case a link to the category page shows up as link to a non-existing page that leads to the edit page. Avoiding this complication is an additional reason for entering in a category page at least a link to the main article on the field and a reference to a higher category to which it belongs.


== Setting sort keys ==
== Setting sort keys ==
Line 32: Line 34:


If you want to link to a category without the current article being added to it you should use the following link form <nowiki>[[:Category:</nowiki>''foobar''<nowiki>]]</nowiki> (where ''foobar'' is the category name), note the extra : before Category.
If you want to link to a category without the current article being added to it you should use the following link form <nowiki>[[:Category:</nowiki>''foobar''<nowiki>]]</nowiki> (where ''foobar'' is the category name), note the extra : before Category.

== Viewing a list of categories ==

You can see currently used categories for each project with [[Special:Categories]], for Wikipedia [[en:Special:Categories]]. It produces a list of all categories, including those which contain subcategories or pages, but have no additional text, with the result that a link to the category page shows up as link to a non-existing page.


==See also==
==See also==

Revision as of 09:18, 13 June 2004

<-MediaWiki User's Guide

The Category namespace consists of pages which each represent a so-called category. You can place a page in a category by adding [[Category:foobar]] to the article's text (where foobar is the name of the category).

For example to add an article called Albert Einstein to the category "people" you would edit the article and add "[[Category:People]]".

Where this line is added does not matter for the software, but e.g. on Wikipedia the rule is to put it at the end of the text, but above any interlanguage links.

The page of the category contains text that can be edited, like any other page, but when displaying the page, the last part of what is displayed is an automatically generated list of all pages in that category.

Sub-categories

Categories themselves can also be specified to belong to another category. When displaying the page of a category to which other categories belong, a separate automatically generated list of sub-categories is also produced.

For example you could edit [[Category:Soccer]] and add the link [[Category:Sport]]. The Soccer category would then be a sub-category of the Sport category.

Categories to which a page belongs

Pages, including categories, can belong to more than one (other) category. The categories to which a page belongs are displayed in a fixed place, depending on the skin (the bottom for Monobook, the upper right corner for Standard), regardless of where in the wikitext they are specified.

Existing categories

You can see currently used categories for each project with Special:Categories, for Wikipedia en:Special:Categories. It produces a list of all categories, including those which contain subcategories or pages, but have no additional text. In that case a link to the category page shows up as link to a non-existing page that leads to the edit page. Avoiding this complication is an additional reason for entering in a category page at least a link to the main article on the field and a reference to a higher category to which it belongs.

Setting sort keys

If you want the article, in the list of articles in the category, to be positioned alphabetically by something other than its name you should use the following link form: [[Category:foobar|sort key]] (where foobar is the category name and sort key is the value to sort by).

For example to add an article called Albert Einstein to the the category "people" and have the article sorted by "Einstein, Albert" you would type "[[Category:People|Einstein, Albert]]".

The sort keys are case sensitive, so [[Category:The Foobar|Foobar]] is sorted before [[Category:The Bar|bar]].

Linking to a category

If you want to link to a category without the current article being added to it you should use the following link form [[:Category:foobar]] (where foobar is the category name), note the extra : before Category.

See also