Meryam Sahin (talk | contribs)
Created page with "{{DISPLAYTITLE:Working with categories}} Categories are a built‑in feature of MediaWiki that help keep content organized. Each category automatically has its own index page. When you add a category tag to a page, you create a link to the category page. Clicking the link takes you to a list of all pages in the same category, making it easy to discover related content. ==How do I use categories?== Alongside namespaces, categories play an important role in organizing co..."
 
Meryam Sahin (talk | contribs)
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Working with categories}}
<status color="green" light="true">done</status> <br>
Categories are a built‑in feature of MediaWiki that help keep content organized. Each category automatically has its own index page. When you add a category tag to a page,  you create a link to the category page. Clicking the link takes you to a list of all pages in the same category, making it easy to discover related content.
{{DISPLAYTITLE:Classify pages with categories}}
 
Categories help classify pages by shared characteristics or topics. A category works like a tag: one or more categories can be assigned to a page to make related content easier to find. <br>
==How do I use categories?==
Categories are specific to each wiki. Each wiki can therefore have its own set of categories.
Alongside namespaces, categories play an important role in organizing content in the wiki. They group related pages together and automatically link them to corresponding category pages. Most categories are created by users, but in some cases MediaWiki assigns categories automatically—for example, to mark pages with broken links.
== When to use categories ==
 
Categories are useful for grouping pages that share a characteristic or topic, regardless of their position in the page hierarchy. <br>
==Features==
Typical examples include:
*'''Category tree:''' Categories can be organized as subcategories of main categories.
* topic
*'''Tagging''': Categories can be used to spontaneously "tag" pages.
* department
*'''Category manager:''' Categories can be systematically created and used by all users via the category manager.
* target audience
*'''Multiple categories per page''': A page can be assigned to several categories.
* content type
*'''Independent of namespaces''': Categories are available throughout the wiki and cannot be limited to individual namespaces.
* project <br>
*'''Page queries: '''Categories are useful for extensions like [[Manual:Extension/BlueSpiceSmartList|Smartlist]] or Semantic Mediawiki as they are available as query arguments.
Categories and subpages serve different purposes:
 
* '''Subpages''' organize related pages into a hierarchy.
==Assigning categories to a page==
* '''Categories''' classify pages by shared characteristics or topics. <br>
<div class="training user">There are different ways to assign a page to categories:
A page can belong to one or more categories and can also be part of a subpage hierarchy. <br>
 
Do not use categories to create a hierarchy of topics. Although MediaWiki technically allows hierarchical categories, this approach is not recommended.
#In the [[Manual:Extension/BlueSpiceDiscovery#Supplementary area|Supplementary area]] at the end of the page
== Assign a category to a page ==
#From the options menu of [[Manual:Extension/VisualEditor|VisualEditor]] (Visual Editing)
A category can be assigned to a page in several ways:
#Via manual input as [[Manual:Wikitext|wikitext]] (source code editing)
* in the '''supplementary area''' at the bottom of the page
#Using the link ''[[Manual:Extension/BlueSpiceDiscovery#Page tools|Page tools > ...all actions > Insert category]]''</div><gallery widths="200" heights="200">
* using '''VisualEditor''' > '''Page options''' > '''Categories'''
File:Manual:Category - footer.png|alt=Supplemental area|Supplemental area
* using '''Page tools''' > '''... all actions''' > '''Insert category'''
File:Manual:Category - VE.PNG|alt=Visual editor|Visual editor
* by entering the category directly in [[Wikitext|wikitext]].
File:Manual:Category - wikitext.png|alt=Wikitext|Wikitext
=== In the supplementary area ===
File:Manual:Category - all actions.png|alt=Link "...all actions"|Link "...all actions"
The supplementary area at the bottom of a page contains the category assignments. With edit permissions, categories can be added or removed using the edit option.
</gallery>
[[File:categories-supplementary-area.png|alt=Category assignments in the supplementary area|center|thumb|400x400px|Category assignments in the supplementary area]]
 
=== In VisualEditor ===
===In the supplementary area at the bottom of the page===
Categories can be added or removed while editing a page in [[Extension/VisualEditor|VisualEditor]].
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.
# Open the page in VisualEditor.
 
# Select '''Categories''' from the page options.
 
# Add or remove categories as needed.
The display of the page categories can be [[Manual:Extension/BlueSpiceConfigManager#Positioning of skin elements|moved to the title area in the Config manager]].<br />
# '''Save''' the changes.
===In the visual editor (VisualEditor)===
[[File:visualeditor-categories-option.png|alt=Categories option in VisualEditor|center|thumb|400x400px|Categories option in VisualEditor]]
In the page options menu of [[Manual:Extension/VisualEditor|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.
=== Using page tools ===
<br />
Categories can also be added or removed from the page tools.
[[File:Category - VE.PNG|alt=Options menu in the visual editor|center|thumb|Options menu in the visual editor]]
# Open the page tools.
 
# Select '''... all actions''' > '''Insert category'''.
===In wikitext===
# Add or remove categories as needed.
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):
# '''Save''' the changes.
[[File:page-tools-insert-category.png|alt=Insert category option in the page tools|center|thumb|400x400px|Insert category]]
=== In wikitext ===
To assign a page to a category, add the following syntax to the page:
<syntaxhighlight lang="text">
<syntaxhighlight lang="text">
[[Category:Production]]
[[Category:Production]]
or
</syntaxhighlight>
The position of the category tag in the source code does not affect the category assignment. Category tags are commonly placed at the end of the page. <br>
Multiple categories can be assigned to the same page:
<syntaxhighlight lang="text">
[[Category:Production]]
[[Category:Production]]
[[Category:Quality management]]
</syntaxhighlight>
</syntaxhighlight>
 
Before assigning a category, check which categories already exist in the wiki. This helps avoid duplicate or similar categories. <br>
{{Messagebox|boxtype=note|icon=|Note text=On category pages, umlauts are listed at the end of the list, e.g. "Märchen" after "Muh". You can use the <nowiki>{{DEFAULTSORT:sortkey}}</nowiki> variable to create an alternative title for the sort (e.g. <nowiki>{{DEFAULTSORT:Maerchen}}</nowiki>).|bgcolor=}}
For more information about categories and their syntax, see the [https://www.mediawiki.org/wiki/Help:Categories MediaWiki documentation on categories].
 
== Category pages ==
​It is true that:
Each category has a corresponding category page. The category page lists the pages and media assigned to that category. <br>
 
For example, assigning a page to <code>Category:Production</code> makes the page appear on the <code>Category:Production</code> category page. <br>
:*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 category can be assigned to pages even if its category page has not yet been created. The category is functional in this case, but the category page itself does not yet contain any content.
:*a page can be assigned to several categories.
[[File:category-page.png|alt=Category page|center|thumb|400x400px|Category page]]
:*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.'''
== View available categories ==
 
The special page <code>Special:Categories</code> provides a list of categories currently used in the wiki. <br>
==Links to category pages==
Select a category to open its category page. <br>
For links directly to a category page, a colon is required before the namespace.
A category can appear in the list even if its category page has not yet been created. In this case, the category is already assigned to pages, but no content has been added to the category page itself.
 
Example: <code><nowiki>[[:Category: new_page]]</nowiki></code>
 
If the colon is missing, the link will not be created, but the page will be tagged with the category instead.
==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.
==Show all category pages ==
On the special page <code>Special:Categories</code> 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.
 
== Which pages can be categorized? ==
== Which pages can be categorized? ==
Whether a page can be categorized depends on its content model. Generally, all pages in content namespaces can be categorized because they have the page content model <code>wikitext</code>.
Whether a page can be categorized depends on its content model. In general, pages with the <code>wikitext</code> content model can be categorized. <br>
 
The following additional content models can also be categorized:
A page's content model can be determined via the ''page tools > Page information > General''. Starting with BlueSpice {{Bsvs|bsvFrom=5.1.7}}, it is possible to tag pages  that have additional page content models:
 
* book
* book
* FormDefinition (Extension:[[Manual:Extension/Forms|Forms]])
* FormDefinition (Extension:[[Extension/Forms|Forms]])
* BPMN (Extension:[[Manual:Extension/CognitiveProcessDesigner|CognitiveProcessDesigner]])
* BPMN (Extension:[[Extension/CognitiveProcessDesigner|CognitiveProcessDesigner]])
* css
* css
* javascript
* javascript
* json
* json
* mail_template
* mail_template
* pdfcreator_template (Extension:[[Manual:Extension/PDFCreator|PDFCreator]])
* pdfcreator_template (Extension:[[Extension/PDFCreator|PDFCreator]])
 
== Link directly to a category page ==
==Category manager==
To create a link to a category page without assigning the current page to that category, add a colon before the <code>Category</code> namespace:
The easiest way to manage categories and subcategories is through the ''Special:Category manager'' page. The [[Manual:Extension/BlueSpiceCategoryManager|Category manager]] can be reached via the menu item ''Global Actions > Editing > Categories''.
<syntaxhighlight lang="text">
 
[[:Category:Production]]
 
</syntaxhighlight>
 
Without the initial colon, the syntax assigns the page to the category instead of creating a link to the category page.
​Category management allows you to create a tree structure. You should therefore think about meaningful main and subcategories. In order to be able to follow the category tree, it is recommended to start with a root category (e.g. 1-Wiki).
== Categories and namespaces ==
 
Categories and namespaces serve different purposes:
If a category is renamed via the category management, the category name is also renamed on all pages that use this category.{{Box_Links-en | Topic1 = [[Manual:Extension/BlueSpiceCategoryManager|Category manager]] |
* '''Namespaces''' provide predefined contexts for different types of content.
Topic2 =[https://www.mediawiki.org/wiki/Help:Categories https://www.mediawiki.org/wiki/Help:Categories]}}
* '''Categories''' classify content according to shared characteristics or topics. <br>
 
Categories can contain pages from different namespaces. They do not replace namespaces. For information about organizing pages with subpages, see [[Subpage]].
[[en:{{FULLPAGENAME}}]]
[[de:Handbuch:Kategorien erstellen und nutzen]]
 
[[Category:Concept]]
[[Category:Organization]]

Latest revision as of 14:59, 26 August 2026

done
Categories help classify pages by shared characteristics or topics. A category works like a tag: one or more categories can be assigned to a page to make related content easier to find.
Categories are specific to each wiki. Each wiki can therefore have its own set of categories.

When to use categories

Categories are useful for grouping pages that share a characteristic or topic, regardless of their position in the page hierarchy.
Typical examples include:

  • topic
  • department
  • target audience
  • content type
  • project

Categories and subpages serve different purposes:

  • Subpages organize related pages into a hierarchy.
  • Categories classify pages by shared characteristics or topics.

A page can belong to one or more categories and can also be part of a subpage hierarchy.
Do not use categories to create a hierarchy of topics. Although MediaWiki technically allows hierarchical categories, this approach is not recommended.

Assign a category to a page

A category can be assigned to a page in several ways:

  • in the supplementary area at the bottom of the page
  • using VisualEditor > Page options > Categories
  • using Page tools > ... all actions > Insert category
  • by entering the category directly in wikitext.

In the supplementary area

The supplementary area at the bottom of a page contains the category assignments. With edit permissions, categories can be added or removed using the edit option.

Category assignments in the supplementary area
Category assignments in the supplementary area

In VisualEditor

Categories can be added or removed while editing a page in VisualEditor.

  1. Open the page in VisualEditor.
  2. Select Categories from the page options.
  3. Add or remove categories as needed.
  4. Save the changes.
Categories option in VisualEditor
Categories option in VisualEditor

Using page tools

Categories can also be added or removed from the page tools.

  1. Open the page tools.
  2. Select ... all actions > Insert category.
  3. Add or remove categories as needed.
  4. Save the changes.
Insert category option in the page tools
Insert category

In wikitext

To assign a page to a category, add the following syntax to the page:

[[Category:Production]]

The position of the category tag in the source code does not affect the category assignment. Category tags are commonly placed at the end of the page.
Multiple categories can be assigned to the same page:

[[Category:Production]]
[[Category:Quality management]]

Before assigning a category, check which categories already exist in the wiki. This helps avoid duplicate or similar categories.
For more information about categories and their syntax, see the MediaWiki documentation on categories.

Category pages

Each category has a corresponding category page. The category page lists the pages and media assigned to that category.
For example, assigning a page to Category:Production makes the page appear on the Category:Production category page.
A category can be assigned to pages even if its category page has not yet been created. The category is functional in this case, but the category page itself does not yet contain any content.

Category page
Category page

View available categories

The special page Special:Categories provides a list of categories currently used in the wiki.
Select a category to open its category page.
A category can appear in the list even if its category page has not yet been created. In this case, the category is already assigned to pages, but no content has been added to the category page itself.

Which pages can be categorized?

Whether a page can be categorized depends on its content model. In general, pages with the wikitext content model can be categorized.
The following additional content models can also be categorized:

To create a link to a category page without assigning the current page to that category, add a colon before the Category namespace:

[[:Category:Production]]

Without the initial colon, the syntax assigns the page to the category instead of creating a link to the category page.

Categories and namespaces

Categories and namespaces serve different purposes:

  • Namespaces provide predefined contexts for different types of content.
  • Categories classify content according to shared characteristics or topics.

Categories can contain pages from different namespaces. They do not replace namespaces. For information about organizing pages with subpages, see Subpage.