This page is protected against editing.

Template:Cl

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

[[:Category:{{{1}}}]]

Protected This template has been protected from editing to prevent vandalism.
Please discuss changes on the talk page or request unprotection.
Documentationview · edit · history · purge ]
This documentation is transcluded from Template:Cl/doc.

Internal link template for categories

Usage

{{cl |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1Category NameCategory name, without a namespace.emptyrequired
Template data
<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.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


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]

Category link

Code Result Equivalent
existing categories

{{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|!Predefinições por função|Predefs|pt}}

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

{{Cl|Link templates}}

Category:Link templates[[:Category:Link templates]]
NOT existing categories

{{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 namespecial output display

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

[[Category:category name]]special output display

{{C|XyzXyz||pt}}

XyzXyz[[:pt:Category:XyzXyz]]

{{Cl|category name}}

Category:Category name[[:Category:Category name]]