Help:Categories
Important note: When you edit this page, you agree to release your contribution into the public domain. If you don't want this or can't do this because of license restrictions, please don't edit. This page is one of the Public Domain Help Pages, which can be freely copied into fresh wiki installations and/or distributed with MediaWiki software; see Help:Contents for an overview of all pages. See Help:Copying for instructions. |
MediaWiki allows you to categorize pages by adding one or more category tags to the text. Adding these tags create links at the bottom of the article which take you to the list of all pages in that category, which makes it easy to browse related articles.
How to add categories
To add an article to a category put the following at the end of the page you are editing...
[[Category:NAME]]
where NAME is the name of the category you want to add it to. Any number of category tags may be added to the page - the page will be listed in all of them.
You can also specify an additional SORT parameter that dictates where the page will appear, alphabetically, within the category. This is achieved by using the following markup:
[[Category:NAME|SORT]]
So for example, to add this page to the 'Help' category, you would use:
[[Category:Help|Categories]]
Note that we used 'Categories' as the sort parameter. Without this the page would be listed under 'H' for 'Help:Categories', instead of under 'C', which is more useful. Other situations where you might want to use the sort parameter is when you have articles about people that are titled as FirstName LastName
but within the category you want them listed as LastName, FirstName
.
Another way to sort the article in the correct letter without the namespace is
[[Category:Help|{{SUBPAGENAME}}]]
This is extremely helpful when using templates which include a category tag. ...
Note: the SORT parameter does not affect how the page title is displayed within the category listing, just how it is ordered. In the above example, the link to this page will still be 'Help:Categories', and not 'Categories' as you might expect!
Linking to Category Pages
To create a link to a category page:
[[:Category:NAME]]
If you were linking to the Category Page for Help on MediaWiki, the link would look like this: Category:Help
If you want to display alternate text for the link:
[[:Category:NAME|TEXT]]
Here is an example of the same link to the Category Page for Help on MediaWiki as above, but with alternative text: MediaWiki Help Index
Categorize Categories
Categories themselves and other uploaded files like Pictures can be categorized exactly like normal pages. It is useful to connect the article-categories with categories already in place to establish connections and hierarchies. To this end, after saving the article, follow the category links at the end of the page to see, if the category is already in place and if not, categorize them until you connect them with an existing category.
Moving categories
Categories cannot be easily moved like other pages. For this reason, category names should be chosen carefully.
The easiest way (for those with admin privileges) is to create the new page, delete the old one, and then change the tags in each member of the category (manually or with a bot). However, this loses the page history - not a huge problem when categories are used only for navigation, but when a wiki is structured differently and the category pages contain significant amounts of text, this is undesirable.
Moving with revision history
However, category pages can be moved together with the full revision history, with some effort, by using the Special:Export and Special:Import functions.
Languages | Languages: |
English {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/af | • {{#if: Help:Categories|Afrikaans| Afrikaans}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/ar | • {{#if: Help:Categories|العربية| العربية}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/az | • {{#if: Help:Categories|azərbaycanca| azərbaycanca}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/bcc | • {{#if: Help:Categories|جهلسری بلوچی| جهلسری بلوچی}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/bg | • {{#if: Help:Categories|български| български}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/br | • {{#if: Help:Categories|brezhoneg| brezhoneg}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/ca | • {{#if: Help:Categories|català| català}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/cs | • {{#if: Help:Categories|čeština| čeština}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/de | • {{#if: Help:Categories|Deutsch| Deutsch}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/el | • {{#if: Help:Categories|Ελληνικά| Ελληνικά}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/es | • {{#if: Help:Categories|español| español}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/fa | • {{#if: Help:Categories|فارسی| فارسی}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/fi | • {{#if: Help:Categories|suomi| suomi}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/fr | • {{#if: Help:Categories|français| français}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/gu | • {{#if: Help:Categories|ગુજરાતી| ગુજરાતી}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/he | • {{#if: Help:Categories|עברית| עברית}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/hu | • {{#if: Help:Categories|magyar| magyar}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/id | • {{#if: Help:Categories|Bahasa Indonesia| Bahasa Indonesia}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/it | • {{#if: Help:Categories|italiano| italiano}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/ja | • {{#if: Help:Categories|日本語| 日本語}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/ko | • {{#if: Help:Categories|한국어| 한국어}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/ksh | • {{#if: Help:Categories|Ripoarisch| Ripoarisch}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/mr | • {{#if: Help:Categories|मराठी| मराठी}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/ms | • {{#if: Help:Categories|Bahasa Melayu| Bahasa Melayu}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/nl | • {{#if: Help:Categories|Nederlands| Nederlands}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/no | • {{#if: Help:Categories|norsk| norsk}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/oc | • {{#if: Help:Categories|occitan| occitan}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/pl | • {{#if: Help:Categories|polski| polski}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/pt | • {{#if: Help:Categories|português| português}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/ro | • {{#if: Help:Categories|română| română}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/ru | • {{#if: Help:Categories|русский| русский}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/si | • {{#if: Help:Categories|සිංහල| සිංහල}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/sq | • {{#if: Help:Categories|shqip| shqip}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/sr | • {{#if: Help:Categories|српски / srpski| српски / srpski}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/sv | • {{#if: Help:Categories|svenska| svenska}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/th | • {{#if: Help:Categories|ไทย| ไทย}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/tr | • {{#if: Help:Categories|Türkçe| Türkçe}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/uk | • {{#if: Help:Categories|українська| українська}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/vi | • {{#if: Help:Categories|Tiếng Việt| Tiếng Việt}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/yue | • {{#if: Help:Categories|粵語| 粵語}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/zh | • {{#if: Help:Categories|中文| 中文}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/zh-hans | • {{#if: Help:Categories|中文(简体)| 中文(简体)}}|}} {{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/zh-hant | • {{#if: Help:Categories|中文(繁體)| 中文(繁體)}}|}} |