Template:Wikidata link/doc
This is a documentation subpage for Template:Wikidata link. It may contain usage information, categories and other content that is not part of the original template page. |
This template uses Lua: |
A template to create a link to either Wikiversity, Wikipedia, Wikisource, Commons, or Reasonator.
Using the specified Wikidata QID, the template checks for the existence of other sitelinks (in this order: en.Wikiversity, en.Wikipedia, en.Wikisource, and Wikimedia Commons) and if one is found links to it. If none is found, it links directly to Wikidata.
Usage
editDescription | Wikitext | Output |
---|---|---|
Simple usage: Wikidata item that is linked to a Wikipedia article | {{Wikidata link|Q42}} | Douglas Adams |
Shortened form: identical behavior, but shorter to type | {{wdl|Q42}} | Douglas Adams |
Wikidata item that is linked to a Wikiversity page | {{wdl|Q111743273}} | areiomineral |
Wikidata item with neither a Wikipedia nor a Wikiversity link | {{wdl|Q54856396}} | Fonts with Representations of the Seven Sacraments: Supplement |
Wikidata item that is linked to a Wikisource author page | {{wdl|Q60727470}} | Alfred Cooper Fryer |
Customized link label | {{wdl|Q42|Mr Adams}} | Mr Adams |
Templatedata
editLink to Wikisource, Wikipedia, Commons, or Reasonator, depending on the sitelinks of the given Wikidata item.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Wikidata ID | 1 | The Q-number of the item. | String | required |
Link text | 2 | The text that will be displayed as the link. | String | suggested |
See also
edit