Template:Commons category-inline

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

Media related to Commons category-inline at Wikimedia Commons

Template documentationview · edit · history · purge ]

Template:High use

Purpose[edit]

This template can be used to generate a link to a Commons category. It is intended for use in the "External links" section of an article.

Usage[edit]

* {{Commons category-inline|Ursus maritimus}}

yields:


* {{Commons category-inline|Ursus maritimus|Polar bears}}

yields:


* {{Commons category-inline|Ursus maritimus|''Ursus maritimus''}}

yields:

TemplateData[edit]

<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

This template creates a link to a category on Commons.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Category name1

The name of the Commons category this template will link to. If no value is provided the Wikidata sitelinks are used by default.

Stringoptional
Displayed text2

The text that the link will display to the user. If no value is provided it will default to category name or page name, in that order.

Stringoptional
nowrapnowrap

Stops the text of the commons category from wrapping

Stringoptional
lcfirstlcfirst

Displays the first letter as lower-case

Stringoptional
italicitalic

Force display text to be italic

Stringoptional
notracknotrack

Turn off tracking categories

Stringoptional

Tracking categories[edit]

Normal categories[edit]

Maintenance categories[edit]

See also[edit]

Template:Commons templates see also