Last edited 2 years ago
by WikiSysop

1 Categories

No edit summary
Tag: 2017 source edit
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:Categories}}
{{DISPLAYTITLE:Categories}}


Categories are a feature of MediaWiki. An index page is automatically created for categories.
If you categorize your pages consistently, you can create useful rollups based on a combination of query criteria.


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.
==Why use categories?==
In addition to namespaces, categories are an important organization principle. They allow pages to be grouped in various ways and automatically link the associated category pages.  


==How do I use categories?==
Categories are usually created by users. In special cases, however, the knowledge base also assigns automatically generated categories for quality purposes (e.g., ''Pages with broken links'').
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==
==Characteristics of categories==
*'''Category tree:''' Categories can be organized as subcategories of main categories.
Categories have the following useful applications:
*'''Hierarchical category tree:''' Categories can be organized with parent-child associations. The category tree is usually maintained by administrators.
*'''Tagging''': Categories can be used to spontaneously "tag" pages.
*'''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.
*'''Category manager:''' The category structure of the wiki can be maintained with the [[Category manager]].
*'''Multiple categories per page''': A page can be assigned to several categories.
*'''Multiple categories per page''': A page can be assigned to as many categories as needed.
*'''Independent of namespaces''': Categories are available throughout the wiki and cannot be limited to individual namespaces.
*'''Independent of namespaces''': Categories are available throughout the knowledge base and cannot be limited to individual namespaces.
*'''Page queries: '''Categories are useful for extensions like [[:Extension/BlueSpiceSmartList|Smartlist]] or Semantic Mediawiki as they are available as query arguments.
*'''Page queries: '''Categories are useful for features like the [[SmartList|Smartlist]] or Semantic Mediawiki, since they make it easy to generate page lists anywhere in the knowledge base.<div class="training user">
== Assigning categories to a page ==
There are different ways to assign a page to categories:


==Assigning categories to a page==
#In the article footer in view mode.
<div class="training user">There are different ways to assign a page to categories:
#From the options menu of the  [[Edit articles|editor toolbar]].
 
#Via manual input as [[Wikitext]] (source code editing).
#In the [[:Extension/BlueSpiceDiscovery#Supplementary area|Supplementary area]] at the end of the page
#From the page tools, using the link ''...all actions > Insert category.''
#From the options menu of [[:Extension/VisualEditor|VisualEditor]] (Visual Editing)
No matter what way you choose to categorize a page, the categories are always written into the source code of the page. This means, that a new page revision is created.
#Via manual input as [[:Wikitext|wikitext]] (source code editing)
</div><gallery widths="200" heights="200">
#Using the link ''[[Extension/BlueSpiceDiscovery#Page tools|Page tools > ...all actions > Insert category]]''</div><gallery widths="200" heights="200">
File:Category - footer.png|alt=Supplemental area|Article footer
File:Category - footer.png|alt=Supplemental area|Supplemental area
File:Category - VE.PNG|Editor toolbar
File:Category - VE.PNG|alt=Visual editor|Visual editor
File:Category - wikitext.png|alt=Wikitext|Wikitext
File:Category - wikitext.png|alt=Wikitext|Wikitext
File:Category - all actions.png|alt=Link "...all actions"|Link "...all actions"
File:Category - all actions.png|alt=Link "...all actions"|Link "...all actions"
</gallery>
</gallery>


===In the supplementary area at the bottom of the page===
===In the article footer===
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.
The article footer 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 Category tree link. <br />
<br />
===In editing mode===
===In the visual editor (VisualEditor)===
In the page options menu of the [[Edit articles|editor toolbar]] there is a menu item for ''Categories''. Here you can update category assignments to the page in edit mode, as well as add a sort key to the category.
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.
<br />
<br />
[[File:Category - VE.PNG|alt=Options menu in the visual editor|center|thumb|Options menu in the visual editor]]
[[File:Category - VE.PNG|center|thumb|Options menu in the visual editor|link=Special:FilePath/Category_-_VE.PNG]]


===In wikitext===
===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):
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):
<syntaxhighlight lang="text">
<syntaxhighlight lang="text">
[[Category:Production]]
[[Category:Production]] [[Category:Automotive]]
or
[[Category:Production]]
</syntaxhighlight>
</syntaxhighlight>


Line 67: Line 66:
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.
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.
==Category manager==
==Category manager==
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 > Management > Categories''.
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''.


{{Box_Links-en | Topic1 = [[Category manager|Category manager]] |  
{{Box_Links-en | Topic1 = [[Category manager|Category manager]] |  

Revision as of 11:58, 23 September 2022


If you categorize your pages consistently, you can create useful rollups based on a combination of query criteria.

1.1 Why use categories?

In addition to namespaces, categories are an important organization principle. They allow pages to be grouped in various ways and automatically link the associated category pages.

Categories are usually created by users. In special cases, however, the knowledge base also assigns automatically generated categories for quality purposes (e.g., Pages with broken links).

1.2 Characteristics of categories

Categories have the following useful applications:

  • Hierarchical category tree: Categories can be organized with parent-child associations. The category tree is usually maintained by administrators.
  • Tagging: Categories can be used to spontaneously "tag" pages.
  • Category manager: The category structure of the wiki can be maintained with the Category manager.
  • Multiple categories per page: A page can be assigned to as many categories as needed.
  • Independent of namespaces: Categories are available throughout the knowledge base and cannot be limited to individual namespaces.
  • Page queries: Categories are useful for features like the Smartlist or Semantic Mediawiki, since they make it easy to generate page lists anywhere in the knowledge base.

1.3 Assigning categories to a page

There are different ways to assign a page to categories:

  1. In the article footer in view mode.
  2. From the options menu of the editor toolbar.
  3. Via manual input as Wikitext (source code editing).
  4. From the page tools, using the link ...all actions > Insert category.

No matter what way you choose to categorize a page, the categories are always written into the source code of the page. This means, that a new page revision is created.

1.3.1 In the article footer

The article footer 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 Category tree link.

1.3.2 In editing mode

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

File:Category - VE.PNG
Options menu in the visual editor

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]] [[Category:Automotive]]
Note: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}}).


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.

Related info