6 Content organisation

Revision as of 14:56, 17 March 2022 by Margit Link-Rodrigue (talk | contribs) (Created page with "<bookshelf src="Book:User manual" /> Categories are a feature of MediaWiki. An index page is automatically created for categories. Pages can be categorized by adding categor...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Categories are a feature of MediaWiki. An index page is automatically created for categories.

Pages can be categorized by adding category tags to the content. These tags generate links at the bottom of the page that lead to an overview of all pages in the same category. This allows for easy browsing of related pages.

How do I use categories?

In addition to namespaces, categories are an important organizational principle in the wiki. They allow pages to be grouped and automatically linked to the associated category pages. Categories are usually created by users. In special cases, however, MediaWiki also assigns automatically generated categories (e.g., Pages with broken links).

Features

  • Category tree: Categories can be organized as subcategories of main categories.
  • Tagging: Categories can be used to spontaneously "tag" pages.
  • Category manager: Categories can be systematically created and used by all users via the category manager.
  • Multiple categories per page: A page can be assigned to several categories.
  • Independent of namespaces: Categories are available throughout the wiki and cannot be limited to individual namespaces.
  • Page <ueries: Categories are useful for extensions like Smartlist or Semantic Mediawiki as they are available as query arguments.

Assigning categoriesto a page

There are different ways to assign a page to categories:
  1. In the Supplementary area at the end of the page
  2. From the options menu of VisualEditor (Visual Editing)
  3. Via manual input as wikitext (source code editing)
  4. Using the link Page tools > ...all actions > Insert category

In the supplementary area at the bottom of the page

The supplement area contains a field for category assignment. Any user with edit rights can click the edit link to add or remove categories from the page. To view all existing categories with subcategories, you can click on the tree icon. Once done, the categories will be confirmed with the tick.

In the visual editor (VisualEditor)

In the page options menu of VisualEditor there is a menu item Categories. Here you can update category assignments to the page in edit mode, as well as add a sort key to the category.
VisualEditor options menu

In wikitext

Open an article that you want to assign to a category in edit mode. Now enter the following anywhere in the wiki code (usually at the end of the page though):

[[Category:Production]]
or
[[Category:Production]]
On category pages, umlauts are listed at the end of the list, e.g. "Märchen" after "Muh". You can use the {{DEFAULTSORT:sortkey}} variable to create an alternative title for the sort (e.g. {{DEFAULTSORT:Maerchen}}).


Note that:

  • categories can be created in any number and by any user. So before you just get started, it's always best to check which categories already exist to avoid unnecessary duplication of similar categories.
  • a page can be assigned to several categories.
  • the place in the source code where the category link is inserted is technically irrelevant. However, the convention is to include categories at the end of an article.

Links to category pages

For links directly to a category page, a colon is required before the namespace.

Example: [[:Category: new_page]]

If the colon is missing, the link will not be created, but the page will be tagged with the category instead.

Related info




To submit feedback about this documentation, visit our community forum.

Discussions