![]() | This is a documentation subpage for Template:Category redirect. It may contain usage information, categories and other content that is not part of the original template page. |
![]() | This template is used on approximately 167,000 pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
![]() | This template should not be substituted. |
__EXPECTUNUSEDTEMPLATE__
![]() | This redirect is used by one or more bots.
If you intend to make significant changes to this redirect, move it, or nominate it for deletion, please notify the bot operator(s) in advance. The relevant bots are: JJMC89 bot and RussBot. |
Instructions[edit source]
Example: To redirect from Category:Authors to Category:Writers, simply add the following to Category:Authors:
- <syntaxhighlight lang="wikitext" inline>
</syntaxhighlight> orThis category is located at Category:Writers. Note: This category should be empty.
The following categories are used to track and monitor this redirect:- From a cross-project redirect: This is a soft redirect that is used as a connection to other Wikimedia projects. A Wikidata element is linked to this page:[[d:Special:EntityPage/Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value).|Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value).)]].
See the instructions for more information.Administrators: If this category name is unlikely to be entered on new pages, and all incoming links have been cleaned up, click here to delete.
- <syntaxhighlight lang="wikitext" inline>
</syntaxhighlight> with optional namespace prefixThis category is located at Category:Writers. Note: This category should be empty.
The following categories are used to track and monitor this redirect:- From a cross-project redirect: This is a soft redirect that is used as a connection to other Wikimedia projects. A Wikidata element is linked to this page:[[d:Special:EntityPage/Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value).|Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value).)]].
See the instructions for more information.Administrators: If this category name is unlikely to be entered on new pages, and all incoming links have been cleaned up, click here to delete.
This template adds category pages to Category:Wikipedia soft redirected categories.
If a category redirect exists but is not likely to be useful (see criteria in WP:Category redirects that should be kept), start a discussion at WP:CFD.
In the case of redirects that are resolved or otherwise used by other templates, consider also adding the template {{R from category navigation}} and/or {{R from template-generated category}} as the unnamed second parameter. For example, on Category:16th-century Czech people:
<syntaxhighlight lang="wikitext">
</syntaxhighlight>This category is located at Category:16th-century people from Bohemia. Note: This category should be empty.
The following categories are used to track and monitor this redirect:- From a cross-project redirect: This is a soft redirect that is used as a connection to other Wikimedia projects. A Wikidata element is linked to this page:[[d:Special:EntityPage/Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value).|Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value).)]].
See the instructions for more information.If more than one "R from" templates are applicable, as on Category:Years of the 19th century in Sri Lanka, do not use a pipe between the two. They should both be included in the second parameter:
<syntaxhighlight lang="wikitext">
</syntaxhighlight>This category is located at Category:Years of the 19th century in Ceylon. Note: This category should be empty.
The following categories are used to track and monitor this redirect:- From a cross-project redirect: This is a soft redirect that is used as a connection to other Wikimedia projects. A Wikidata element is linked to this page:[[d:Special:EntityPage/Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value).|Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value).)]].
See the instructions for more information.If a category redirect is intended to be kept when the above templates are not applicable, e.g. for alternative spellings, then add
|keep=yes
to suppress a deletion link that is usually displayed to administrators. It is not necessary to specify this when using the "R from" templates, because this function is switched on by their presence. It is not automatically enabled when a Wikidata item is attached to the category (see the next section), because caching issues often prevent the link from showing up when the category redirect was a temporary addition. If such a redirect should be kept, add|keep=yes
.Redirects with Wikidata items[edit source]
Redirects with Wikidata items are automatically categorized as such; there is no need to manually add {{soft redirect with Wikidata item}}. For an example, see Category:Fictional schoolchildren.
Templates in the target name[edit source]
Note that the use of multiple templates in the target name, or templates with any parameters, will prevent the redirect from being resolved by {{Resolve category redirect}}, as will the character
|
. Category redirects which cannot be resolved are tracked in Category:Wikipedia soft redirected categories which are not resolved correctly.For more information, see Template:Resolve category redirect#Templates.
Errors[edit source]
Non-empty categories will be listed at Category:Wikipedia non-empty soft redirected categories ( 0 ).
Additionally, Category:Wikipedia category-redirect box parameter needs fixing tracks five different errors with the category redirect box itself:
- Infinite loops of length one will be listed at Category:Wikipedia soft redirected categories which target themselves ( 0 )
- Redirects with non-existent targets will be listed at Category:Wikipedia soft redirected categories whose target does not exist ( 0 )
- Templates with unknown parameters will be listed at Category:Pages using category redirect with unknown parameters ( 0 )
- Category redirects which are not correctly resolved via {{resolve category redirect}} will be listed at Category:Wikipedia soft redirected categories which are not resolved correctly ( 0 )
- Double category redirects will be listed at Category:Double-redirected categories ( 0 )
TemplateData[edit source]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Category redirect in articles based on its TemplateData.TemplateData for Category redirect
Marks category as a soft-redirect
Template parameters
This template prefers inline formatting of parameters.
Parameter Description Type Status Destination category 1
Category that this category should redirect to (Category: prefix is optional)
- Example
- Category:Writers
Page name required Redirect categories 2
This parameter is for various {{redirect template}}s
- Example
- {{R from category navigation}}
String optional nocat nocat
If "true", suppresses categorization. This should only be used for examples.
- Default
- false
- Example
- yes
Boolean optional keep keep
If "true", hides the link for admins to delete the category if empty. This feature is automatically enabled if any {{redirect templates}} are supplied.
- Default
- false
Boolean optional See also[edit source]
- Template:Category redirect/core
- Template:Category disambiguation
- Template:Resolve category redirect
- wikipedia:Wikipedia:Template index/Category namespace
- From a cross-project redirect: This is a soft redirect that is used as a connection to other Wikimedia projects. A Wikidata element is linked to this page:
- From a cross-project redirect: This is a soft redirect that is used as a connection to other Wikimedia projects. A Wikidata element is linked to this page: