Difference between revisions of "Template:Commons-inline/doc"

From blackwiki
Jump to navigation Jump to search
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
imported>BoldLuis
Line 9: Line 9:
 
; Full syntax
 
; Full syntax
 
<pre>
 
<pre>
{{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}}
+
{{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
 +
}}
 
</pre>
 
</pre>
  

Revision as of 20:06, 1 May 2020

Usage

{{Commons-inline|Commons-gallery-page-name}}

Commons gallery page name is optional: if missing, template will look up associated gallery in wikidata. If that's missing, will find associated category. If that's missing, will fall back to 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
}}

Examples

Normal
{{Commons-inline|Work}}

16x16px Media related to Work at Wikimedia Commons

Text override
{{Commons-inline|Work|Puffle}}

16x16px Media related to Puffle at Wikimedia Commons

Full link override
{{Commons-inline|links=[[commons:Foo|]] and [[commons:Bar|]]}}

16x16px Media related to Foo and Bar at Wikimedia Commons

List format
{{Commons-inline|list=
* [[commons:Foo|Foo]]
* [[commons:Bar|Bar]]
* [[commons:Row|Row]]
* [[commons:Dee|Dee]]
}}

16x16px Related media at Wikimedia Commons:

Extra text
{{Commons-inline|Work|extratext= Extra text}}

16x16px Media related to Work at Wikimedia Commons Extra text

Force Commons search
{{Commons-inline|search=Work}}

16x16px Media related to Work at Wikimedia Commons

See also