Template:Commons/doc

This template is part of Wikipedia's sister projects. This template links an article to a page on Wikimedia Commons. Without any arguments, the template uses Wikidata to automatically link to an available gallery or category (if gallery is not available). With an argument, the template links to the named gallery.

Usage



 * —puts link-box with current page's name.
 * —puts link-box connecting title pagename.
 * —puts link-box showing the title showname.
 * —floats link-box to the left side.
 * }
 * —puts link-box showing the title showname.
 * —floats link-box to the left side.
 * }
 * }

To place this template on the page, type  , where pagename is the name of a page on Wikimedia Commons (defaults to "", the end-name of a page where used).
 * The optional 2nd parameter gives the displayed link text.
 * The position parameter accepts one keyword,, to float the box to the left instead of to the right.
 * To link to a Category, use the related template, where catname is the name of the category.

Defaults
The pagename defaults to wiki-variable "", which is the end-name of the page where used. For a Template:Txxx, the would be the end-name "Txxx". For a Category:Catxxx, that page would have as the end-name "Catxxx".

The default positioning of the link-box is to the right-side.

Examples
produces

produces

produces

produces

produces

Template data
{ "description": "Creates a small box with a link to a related page on Wikimedia Commons.", "params": { "1": {   "label": "Pagename", "description": "The page name on Commons. The article's page name is used as a default.", "type": "string", "required": false }, "2": {    "label": "Showname", "description": "Optional displayed link text.", "type": "string", "required": false }, "position": { "label": "Position", "description": "Position to display the box: 'left' floats the box to the left rather than the default which is on the right.", "type": "string", "required": false } }}