Template:Commons-inline/doc

From English Wikipedia @ Freddythechick

This template relies on Template:Sister-inline.

Usage

<syntaxhighlight lang="wikitext">

</syntaxhighlight> Commons gallery page name is optional; if missing, the template will look up the associated gallery in Wikidata. If that's missing, it will find the associated category. If that's missing, it will finally fall back to a Commons search.

Full syntax

<syntaxhighlight lang="wikitext">

  • Related media at Wikimedia Commons:

wikitext for a list </syntaxhighlight>

Examples

Normal

<syntaxhighlight lang="wikitext">* Media related to Work at Wikimedia Commons</syntaxhighlight>

  • Media related to Work at Wikimedia Commons
Text override

Work is the link target and Puffle is the link label. <syntaxhighlight lang="wikitext">* Media related to Puffle at Wikimedia Commons</syntaxhighlight>

  • Media related to Puffle at Wikimedia Commons
Full link override

<syntaxhighlight lang="wikitext">* Media related to [[commons:Foo|]] and [[commons:Bar|]] at Wikimedia Commons</syntaxhighlight>

  • Media related to Foo and Bar at Wikimedia Commons
List format

<syntaxhighlight lang="wikitext">* Related media at Wikimedia Commons:

Related media at Wikimedia Commons:

Another list format, including Commons templates

<syntaxhighlight lang="wikitext">* Related media at Wikimedia Commons:

Commons:Timed Text
{{Captions requested}}</syntaxhighlight>
  • Related media at Wikimedia Commons:
Commons:Timed Text
{{Captions requested}}
Extra text

<syntaxhighlight lang="wikitext">* Media related to Work at Wikimedia Commons Extra text</syntaxhighlight>

  • Media related to Work at Wikimedia Commons Extra text
Force Commons search

<syntaxhighlight lang="wikitext">* Media related to Work at Wikimedia Commons</syntaxhighlight>

  • Media related to Work at Wikimedia Commons
Turn off tracking categories (for use inside other templates)

<syntaxhighlight lang="wikitext">* Media related to Work at Wikimedia Commons</syntaxhighlight>

  • Media related to Work at Wikimedia Commons

Tracking categories

Normal categories

Maintenance categories

See also

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Commons-inline in articles based on its TemplateData.

TemplateData for Commons-inline

Add an inline link to Commons gallery or category related to article

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Commons gallery1

Title of Commons gallery. If empty, looks up relevant gallery or category in Wikidata

Stringoptional
Display text2

Link text to display. If empty, uses gallery or category title

Stringoptional
italicitalic

whether to italicize link text

Default
false
Booleanoptional
notracknotrack

if true, turn off tracking categories

Default
false
Booleanoptional
linkslinks

wikitext to use instead of default links

Contentoptional
listlist

bulletted list to use instead of generated text

Contentoptional
extratextextratext

Extra text to add after normal template result

Contentoptional
shortshort

Do not display any text, just logo and link

Default
false
Booleanoptional
searchsearch

If non-empty, string to search for in Commons

Stringoptional