Template:Category redirect/doc

From Wikipedia, the free encyclopedia

Instructions[edit]

Example: To redirect from Category:Authors to Category:Writers, simply add the following to Category:Authors:

{{Category redirect|Writers}} or
{{Category redirect|Category:Writers}} with optional namespace prefix

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:

{{Category redirect | 16th-century people from Bohemia | {{R from category navigation}} }}

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:

{{Category redirect | Years of the 19th century in Ceylon | {{R from category navigation}} {{R from template-generated category}} }}

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.

Templates in the target name[edit]

Note that the use of templates in the target name will prevent the redirect from being resolved by {{Resolve category redirect}}, as will the characters | or !.

For more information, see Template:Resolve category redirect#Templates.

Errors[edit]

TemplateData[edit]

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.

ParameterDescriptionTypeStatus
Destination category1

Category that this category should redirect to

Example
Writers
Page namerequired
Redirect categories2

This parameter is for various {{redirect template}}s

Example
{{R from category navigation}}
Stringoptional
nocatnocat

If "true", suppresses categorization. This should only be used for examples.

Default
false
Example
yes
Booleanoptional
keepkeep

If "true", hides the link for admins to delete the category if empty

Default
false
Booleanoptional

See also[edit]