On Thursday, approximately 10AM UTC, we'll be performing our MediaWiki 1.34 deployment. Please expect some downtime, we apologise in advance for any inconvenience!
MediaWiki allows you to categorize pages by adding one or more category links to the text. Adding categories creates 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:
where NAME is the name of the category you want to add it to. A page may be added to any number of categories - the page will be listed in all of them.
You can also specify an additional SORT or collation parameter that dictates where the page appears, alphabetically, within the category. By default, the page is collated by its name. Changing that is achieved by using the following markup:
So for example, to add this page to the 'Help' category, you would use:
'Categories' is the collation order. 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
Another way to sort the article in the correct letter without the namespace is
This is extremely helpful when using templates which include a category tag.
The SORT order 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:Category', and not 'Categories'.
Linking to category pages
To create a link to a category page:
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:
Here is an example of the same link to the Category Page for Help on MediaWiki as above, but with alternate text: MediaWiki Help Index
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. This is called a Category Tree.
Moving category pages
Category pages cannot be moved like other pages.
The only way (in no particular order) is to create the new page, delete the old one, and change the links in each member of the category (manually or with a bot).
- Special:Categories; a list of categories on ShoutWiki Hub. The special page is on every wiki.