Template:Cl/doc

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Internal link template for categories

Usage

{{cl |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1Category NameCategory name, without a namespace.emptyrequired
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

Internal link template for categories

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Category Name1

Category name, without a namespace.

Stringrequired

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

Example

{{cl|Internal link templates}}

renders as:

See also

Localization

This template is not intended to be localized. [edit subpage]

Code Result Equivalent
Categories existing on Commons

{{C|Link templates}}

Link templates[[:Category:Link templates|Link templates]]

{{C|Link templates|Display name}}

Display name[[:Category:Link templates|Display name]]

{{C|Link templates|3=X}}

Link templates[[:Category:Link templates|Link templates]]

{{C|Link templates|3=x}}

Link templates[[:Category:Link templates|Link templates]]

{{C|Link templates|3=B}}

[[Link templates]](special output display)

{{C|Link templates|3=-}}

Category:Link templates(special output display)

{{C|Link templates|3=+}}

Category:Link templates(special output display)

{{Cl|Link templates}}

Category:Link templates[[:Category:Link templates]]
Categories NOT existing on Commons

{{C|Category name}}

Category name[[:Category:category name|category name]]

{{C|Category name|Display name}}

Display name[[:Category:Category name|Display name]]

{{C|Category name|3=X}}

Category name(special output display)

{{C|Category name|3=x}}

Category name(special output display)

{{C|PowerHaus|3=X}}

PowerHaus(not-empty not-existing category)

{{C|PowerHaus|3=x}}

PowerHaus(not-empty not-existing category)

{{C|Category name|3=x}}

[[Category:Category name]](special output display)

{{Cl|Category name}}

Category:Category name[[:Category:Category name]]
Categories on other wikis (e.g. below on Portuguese Wikipedia), existence not tested

{{C|!Predefinições por função|Predefs|pt}}

Predefs[[:pt:Category:!Predefinições por função|Predefs]]

{{C|XyzXyz||pt}}

XyzXyz[[:pt:Category:XyzXyz]]