Template:Commons-inline
Media related to Commons-inline at Wikimedia Commons
| This template is used on approximately 25,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
| This template uses Lua: |
This template relies on Template:Sister-inline.
Purpose
This template can be used to generate a link to a page containing media related to a Commons category. It is intended for use in the "External links" section of an article.
Usage
* {{Commons-inline|Commons-gallery-page-name}}
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
* {{Commons-inline
|list= wikitext for a list
|links= wikitext to override default link
|Commons-gallery-page-name=
|extratext= extra text
|search= string to search in Commons
|notrack= turn off tracking categories
|italic= italicize link text
}}
Examples
- Normal
* {{Commons-inline|Work}}
Media related to Work at Wikimedia Commons
- Text override
Work is the link target and Puffle is the link label.
* {{Commons-inline|Work|Puffle}}
Media related to Puffle at Wikimedia Commons
- Full link override
* {{Commons-inline|links=[[commons:Foo|]] and [[commons:Bar|]]}}
- List format
{{Commons-inline|list=
* [[commons:Foo|Foo]]
* [[commons:Bar|Bar]]
* [[commons:Row|Row]]
* [[commons:Dee|Dee]]
}}
Related media at Wikimedia Commons:
- Another list format, including Commons templates
* {{Commons-inline|list=
:[[c:Commons:Timed Text|Commons:Timed Text]]
:<nowiki>{{</nowiki>[[Commons:Template:Captions requested|Captions requested]]<nowiki>}}</nowiki>
}}
- Extra text
* {{Commons-inline|Work|extratext= Extra text}}
Media related to Work at Wikimedia Commons Extra text
- Force Commons search
* {{Commons-inline|search=Work}}
Media related to Work at Wikimedia Commons
- Turn off tracking categories (for use inside other templates)
* {{Commons-inline|Work|notrack=1}}
Media related to Work at Wikimedia Commons
Tracking categories
Normal categories
- Category:Commons link from Wikidata (14,718)
- Category:Commons link is on Wikidata (3,005)
Maintenance categories
- Category:Commons link is defined as the pagename (22)
- Category:Commons link is locally defined (7,471)
- Category:Commons link is the pagename (16,488)
- Category:Inconsistent wikidata for Commons gallery (19)
See also
- Wikipedia:Manual of Style/Layout § External links
- {{Commons}}—shows Commons box
- {{Commons-inline}}—shows Commons gallery inline
- {{Commons category}}—shows Commons category box
- {{Commons category-inline}}—shows Commons category inline
- {{Commons category multi}}—to list up to twelve categories
- {{Commons and category}}—shows Commons box with both gallery and category
- {{Commons and category inline}}—shows Commons gallery and category inline
- {{Copy to Wikimedia Commons}}
- {{Wikimedia Commons redirect}}—specialized soft redirect template for Commons
- {{Wiki category}}—to link to a gallery hosted on Wikipedia
- mw:Manual:Pywikibot/commonscat.py
- {{Sister project links}}—to link all Wikinews, Wikisource, etc.
- {{Wikibooks}} / {{Wikibooks inline}}
- {{Wikidata property}}
- {{Wikinews}} / {{Wikinews inline}}
- {{Wikiquote}} / {{Wikiquote inline}}
- {{Wikisource}} / {{Wikisource inline}}
- {{Wikispecies}} / {{Wikispecies inline}}
- {{Wikiversity}} / {{Wikiversity inline}}
- {{Wikivoyage}} / {{Wikivoyage inline}}
- {{Wiktionary}} / {{Wiktionary inline}}
TemplateData
TemplateData for Commons-inline
Add an inline link to Commons gallery or category related to article
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Commons gallery | 1 | Title of Commons gallery. If empty, looks up relevant gallery or category in Wikidata | String | optional |
| Display text | 2 | Link text to display. If empty, uses gallery or category title | String | optional |
| italic | italic | whether to italicize link text
| Boolean | optional |
| notrack | notrack | if true, turn off tracking categories
| Boolean | optional |
| links | links | wikitext to use instead of default links | Content | optional |
| list | list | bulletted list to use instead of generated text | Content | optional |
| extratext | extratext | Extra text to add after normal template result | Content | optional |
| short | short | Do not display any text, just logo and link
| Boolean | optional |
| search | search | If non-empty, string to search for in Commons | String | optional |
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.