Graves DiseaseGraves Disease and Hyperthyroidism Wiki

 
Help:Category


Contents

[edit] UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY


[edit] CLICK HERE


A category is a feature of MediaWiki used to organize pages. Categories provide automatic indexes, that can serve as a "Table of Contents" for collections of related pages. Using categories takes some getting used to and ongoing maintenance, but can help people navigate the wiki when used appropriately. It helps to have a couple of Clean Up Crew Wiki Helpers dedicated to maintaining categories. An alternative method of linking to related pages is to manually create "index" pages that use internal links. (see Help:Organizing pages for examples). However, as more and more content is added, your wiki may benefit from the use of categories.

For a full description of categories, see the MediaWiki Help:Category page, as well as the MediaWiki Categorisation FAQs. The information below should be enough to get you started.

[edit] Overview

A category page is a specific type of page that (optionally) includes some text, as well as an ordered list of pages that are associated with the category. For example, a category page called <nowiki>[[</nowiki>Category:Treatments]] may include a general comment about treatments and an automatically generated list of pages that have been associated with the treatment category. Members associate pages with a category by including a special category tag as described below. Each associated page shows a link to the categories they are a part of at the bottom of the page (in a separate section from the page's content).

Categories have their own namespace and a complete list of them can be found at the Special:Categories page.

[edit] 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.:

<nowiki>[[</nowiki>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". For example, this page is part of the Example Category category as evidenced by the link at the bottom of this page. This means that it will be automatically inserted into the list of pages on the Category:Example Category page.

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 bottom of the page. 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).

[edit] Linking to a category page from within a page's text

If you want to link to a category page somewhere in the text of a page (as opposed to the bottom of the page), you need to include an extra ":" at the beginning of the internal link. For example, typing <nowiki>Category:Example Category</nowiki> shows up as Category:Example Category. If the leading ":" is missing, the category link will show up at the bottom of the page, not where it is typed, and the page will be added to that category. Simply linking to a category does not add the page to that category.

[edit] Creating a category page

Category pages are created automatically when a page is included in a category. So, to create the category Category:Treatments, you would just need to add a page to the category or link to a category page from within a page's text. You can then follow the link and add any text that you would like to, just as you would with a regular page.

[edit] 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 <nowiki></nowiki>. Then go to the newly created category page and edit it. Add the category tag for the parent category (e.g. <nowiki></nowiki>) to the page. In this example, the Soccer category would then be a subcategory of the Sports category.

[edit] Category page

A category page consists of:

  • editable text
  • a list of subcategories
  • a list of regular pages in the category
  • a list of images with thumbnails

The items in the lists all link to the pages concerned; in the case of the images this applies both to the image itself and to the text below it (the name of the image).

The first and second list each have a header for each first character, dispensed with if there are no entries for a header.

By default, the pages are listed in alphabetical order, although this can be changed if necessary (see MediaWiki Help:Category page).

[edit] Category considerations

If you decide to use categories, you should make sure that each page is in at least one category. It may be in more, but it may be wise not to put a page in a category and also in a more general category. Each category, except one top-level category, is typically in at least one higher level category.

[edit] Renaming a category page

The only way to rename (i.e., move) a category page is to manually change all category tags that link to the category, and copy the editable part. The editable first part of a category can be renamed like any other page, but the subcategories, pages, and images in that category will not change to point to the newly renamed category. There is no automatic way to rename a category page in the way you can rename a regular page.

Redirecting a category page is possible, but discouraged.

[edit] Singular or plural

It is not obvious whether a page like Amsterdam should be in category City (a description of a member of the category) or Cities (a description of the category as a set of pages). A convention for using one or the other is useful to avoid ending up with both, with part of the applicable pages in one, and part in the other.

[edit] List of all categories

Special:Categories provides an alphabetic list of all categories, with the number of members of each; this number does not include the content of the subcategories, but it includes the subcategories themselves.