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

From blackwiki
Jump to navigation Jump to search
imported>Headbomb
imported>Jonesey95
(add high use)
 
(49 intermediate revisions by 39 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 +
{{high use}}
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
__NOTOC____NOEDITSECTION__
+
{{template shortcut|Commonscat-inline}}
  
=== Purpose ===
+
==Purpose==
This template can be used to generate a link to a [[commons:Commons:Categories|Commons category]]. It intended for use in the "External links" section of an article.
+
This template can be used to generate a link to a [[commons:Commons:Categories|Commons category]]. It is intended for use in the "[[WP:LAYOUTEL|External links]]" section of an article.
  
=== Usage ===
+
==Usage==
 +
<kbd><nowiki>* {{Commons category-inline|Ursus maritimus}}</nowiki></kbd>
  
<tt><nowiki>{{Commons category-inline|Ursus maritimus}}</nowiki></tt>
+
yields:
 +
* {{Commons category-inline|Ursus maritimus}}
 +
----
 +
<kbd><nowiki>* {{Commons category-inline|Ursus maritimus|Polar bears}}</nowiki></kbd>
  
 
yields:
 
yields:
{{Commons category-inline|Ursus maritimus}}
+
* {{Commons category-inline|Ursus maritimus|Polar bears}}
 
+
----
 +
<kbd><nowiki>* {{Commons category-inline|Ursus maritimus|''Ursus maritimus''}}</nowiki></kbd>
  
 +
yields:
 +
* {{Commons category-inline|Ursus maritimus|''Ursus maritimus''}}
  
<tt><nowiki>{{Commons category-inline|Ursus maritimus|Polar bears}}</nowiki></tt>
+
==TemplateData==
 +
{{TemplateDataHeader}}
 +
<TemplateData>
 +
{
 +
        "description": "This template creates a link to a category on Commons.",
 +
        "params": {
 +
                "1": {
 +
                        "label": "Category name",
 +
                        "description": "The name of the Commons category this template will link to. If no value is provided the Wikidata sitelinks are used by default.",
 +
                        "type": "string",
 +
                        "required": false
 +
                },
 +
"2": {
 +
                        "label": "Displayed text",
 +
                        "description": "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.",
 +
                        "type": "string",
 +
                        "required": false
 +
                },
 +
"nowrap": {
 +
"label": "nowrap",
 +
"description": "Stops the text of the commons category from wrapping",
 +
"type": "string",
 +
"required": false
 +
},
 +
"lcfirst": {
 +
"label": "lcfirst",
 +
"description": "Displays the first letter as lower-case",
 +
"type": "string",
 +
"required": false
 +
}
 +
        }
 +
}
 +
</TemplateData>
  
yields:
+
==Tracking categories==
{{Commons category-inline|Ursus maritimus|Polar bears}}
+
=== Normal categories ===
 +
* {{clc|Commons category link from Wikidata}}
 +
* {{clc|Commons category link is on Wikidata}}
 +
=== Maintenance categories ===
 +
* {{clc|Commons category link is defined as the pagename}}
 +
* {{clc|Commons category link is locally defined}}
 +
* {{clc|Commons category link is the pagename}}
  
=== See also ===
+
==See also==
* [[Template:Commons category]]
+
* {{section link|Wikipedia:Manual of Style/Layout#External links}}
* [[Template:Commons]]
+
* {{tl|Commons}}
* [[wikipedia:Layout#External links|Layout (External links)]]
+
* {{tl|Commons-inline}}—shows Commons gallery inline
 
+
* {{tl|Commons category}}
* {{tl|Commons-inline}}
+
* {{tl|Commons category multi}}—to list up to six categories
* {{tl|Commons category-inline}}
+
* {{tl|Commons and category}}—shows Commons gallery and category
 +
* {{tl|Commons and category-inline}}—shows Commons gallery and category inline
 +
* {{tl|Wikimedia Commons redirect}}—specialized soft redirect template for Commons
 +
* {{tl|Sister project links}}—to link all Wikinews, Wikisource, etc.
 +
* {{tl|Wikibooks-inline}}
 
* {{tl|Wikinews-inline}}
 
* {{tl|Wikinews-inline}}
 
* {{tl|Wikiquote-inline}}
 
* {{tl|Wikiquote-inline}}
 
* {{tl|Wikisource-inline}}
 
* {{tl|Wikisource-inline}}
 
* {{tl|Wikispecies-inline}}
 
* {{tl|Wikispecies-inline}}
 +
* {{tl|Wikiversity-inline}}
 
* {{tl|Wiktionary-inline}}
 
* {{tl|Wiktionary-inline}}
* {{tl|Wikiversity-inline}}
 
  
<includeonly>
+
<includeonly>{{Sandbox other||
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
[[Category:Exclude in print]]
 
[[Category:Exclude in print]]
[[Category:Interwiki link templates|{{PAGENAME}}]]
+
[[Category:Interwiki category linking templates]]
[[Category:Interwiki category linking templates|{{PAGENAME}}]]
+
[[Category:Interwiki link templates]]
[[Category:Wikimedia Commons templates|{{PAGENAME}}]]
+
[[Category:Wikimedia Commons templates]]
  
</includeonly>
+
[[de:Vorlage:Commonscat]]<!-- in German Wikipedia commonscat-template itself is formated inline -->
[[ca:Plantilla:Commonscat-inline]]
+
}}</includeonly>
[[et:Mall:Commonsi kategooria-tekstina]]
 
[[th:แม่แบบ:คอมมอนส์บนบรรทัด]]
 

Latest revision as of 14:12, 16 November 2020

Purpose

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

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

yields:


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

yields:


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

yields:

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Commons category-inline

This template creates a link to a category on Commons.

Template parameters

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

Tracking categories

Normal categories

Maintenance categories

See also