Difference between revisions of "Categories - Mediawiki"

From Help Wiki
m
m
Line 9: Line 9:
 
This lists the page on the appropriate category page automatically and also provides a link at the bottom of the page to the category page, which is in the namespace "Category".  Pages can be included in more than one category by adding multiple category tags. These links do not appear at the location where you inserted the tag, but at the page margin in a fixed place, depending on the skin (the bottom for Monobook, the upper right corner for Standard). Category tags may be placed anywhere in the article, although they are typically added to the end of the article to avoid undesirable text display side effects. Category links are displayed in the order they occur in the article, unlike the automatic ordering of lists in the category pages themselves (see below).
 
This lists the page on the appropriate category page automatically and also provides a link at the bottom of the page to the category page, which is in the namespace "Category".  Pages can be included in more than one category by adding multiple category tags. These links do not appear at the location where you inserted the tag, but at the page margin in a fixed place, depending on the skin (the bottom for Monobook, the upper right corner for Standard). Category tags may be placed anywhere in the article, although they are typically added to the end of the article to avoid undesirable text display side effects. Category links are displayed in the order they occur in the article, unlike the automatic ordering of lists in the category pages themselves (see below).
  
 +
===Sub Categories===
 +
By categorizing a category page you in effect nest that category. Example: if on the category page ''"Poodle"'' I include the syntax ''category:Hunting Dogs'' it turns the Poodle category into a subcategory of ''"Hunting Dogs"''.
  
 
==Category page==
 
==Category page==

Revision as of 14:09, 11 September 2012

Categories allow you to create a taxonomic structure for your wiki content. Categories provide automatic indexes, that are useful as tables of contents.

Putting an item in a category

A page in any namespace can be put in a category by adding a category tag to the page (by convention, at the end of the page), e.g.:

[[Category:Category name]]

This lists the page on the appropriate category page automatically and also provides a link at the bottom of the page to the category page, which is in the namespace "Category". Pages can be included in more than one category by adding multiple category tags. These links do not appear at the location where you inserted the tag, but at the page margin in a fixed place, depending on the skin (the bottom for Monobook, the upper right corner for Standard). Category tags may be placed anywhere in the article, although they are typically added to the end of the article to avoid undesirable text display side effects. Category links are displayed in the order they occur in the article, unlike the automatic ordering of lists in the category pages themselves (see below).

Sub Categories

By categorizing a category page you in effect nest that category. Example: if on the category page "Poodle" I include the syntax category:Hunting Dogs it turns the Poodle category into a subcategory of "Hunting Dogs".

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."
  • list of images with thumbnails (how many there are is not counted);

To create or link to 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]]


Comparison with "What links here"

Backlinks are often used as a by-product of links. However, links can be put specially for the backlinks, just like category tags are. In that case a redirect corresponds to a supercategory.

Advantages of categories:

  • Category listings are alphabetical, for "What links here" this typically applies for the first part only, for the pages already linking to the given page at the time of the last rebuilding of the link tables in the database.
  • Categories have an editable part (however, there is anyway a talk page)
  • A category can have multiple supercategories


Moving a category page

The only way to move a category page is to manually change all category tags that link to the category, and copy the editable part. There is no automatic way to move a category page in the way one moves an article page.

The editable first part of a category can be moved like any other page, but that won't move the subcategories, articles, and images in the second, third, and fourth part (see above). For categories entirely populated by templates (see above) modifying the templates allows to move all affected articles to a renamed category.

Redirecting a category page is possible, but almost certainly won't have the desired effect (it can be abused for other purposes).


Source: http://meta.wikimedia.org/w/index.php?title=Help:Category