hw>Margit.link-rodrigue No edit summary |
m (1 revision imported) |
Revision as of 11:50, 22 September 2022
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.
1.1 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).
1.2 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 queries: Categories are useful for extensions like Smartlist or Semantic Mediawiki as they are available as query arguments.
1.3 Assigning categories to a page
- In the Supplementary area at the end of the page
- From the options menu of VisualEditor (Visual Editing)
- Via manual input as wikitext (source code editing)
- Using the link Page tools > ...all actions > Insert category
- Manual:Category - footer.png
Supplemental area
- Manual:Category - VE.PNG
Visual editor
- Manual:Category - wikitext.png
Wikitext
- Manual:Category - all actions.png
Link "...all actions"
1.3.1 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.
1.3.2 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.
1.3.3 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]]
It is true 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.
1.4 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.
1.5 Category pages
When users click a category link, the Category:<Category_Name> page loads. All pages and media that are assigned to a specific category are automatically listed there.
If you click on a category page that has not yet been created - linked in red - you have the option of creating the category page.
1.6 Show all category pages
On the special page Special:Categories
you can view a list of all existing categories in the wiki. Click on a category to go to the corresponding category page. If a page in the listing has a red background, the category is in use in the wiki, but the associated category page has not yet been created.
1.7 Category manager
The easiest way to manage categories and subcategories is through the Special:Category manager page. The Category manager can be reached via the menu item Global Actions > Management > Categories.