Template:In category

Revision as of 05:56, 18 July 2022 by Wikipedia>Ais523 (allow overriding the "and" to an "or", for templates that categorise into one of two categories rather than both at once)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit "Template:In category/doc" to edit its documentation if it is available. (How does this work?)

The {{In category}} template is designed for use on the documentation subpages of templates. It produces a hatnote that specifies into which category the documented template is categorised.

Basic usage is along the lines of {{In category|Candidates for speedy deletion}}, which produces the following message:

It is possible to specify more than one category, e.g. {{In category|Candidates for speedy deletion|Candidates for speedy deletion by user}} produces:

Up to five categories are supported.

To override the "and" with another conjunction, use the |and= parameter.
For example, {{In category|Candidates for speedy deletion|Candidates for speedy deletion by user|and=or}} would produce:

This template does nothing to change the functionality of the documented template: in particular, it will not actually apply the categories. Its purpose is simply to produce a note about what the documented template does, but you will need to implement the template's actual functionality separately.

Produces a note about which categories a template will categorize the pages it's applied to into.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Category 11

The first category into which the documented template categorises

Unknownrequired
Category 22

The second category into which the documented template categorises

Unknownoptional
Category 33

The third category into which the documented template categorises

Unknownoptional
Category 44

The fourth category into which the documented template categorises

Unknownoptional
Category 55

The fifth category into which the documented template categorises

Unknownoptional
Override for "and"and

A word to use instead of "and" when writing the lists of categories that the documented template categorises into. Only used if at least two templates are listed.

Suggested values
or
Default
and
Example
or
Contentoptional