Template:Wikidata

From OpenStreetMap Wiki
Jump to navigation Jump to search


Can be used to provide a link to a [W]Wikidata item. Can sometimes be useful instead of {{Wikipedia}} or {{WikiIcon}} if no [W] Wikipedia article is available.

Usage

{{Wikidata[|item id[|text]][|id=yes][|icon=yes|no]}}

Parameters

  • First parameter: Wikidata item id prefixed with Q, e.g. Q936 for OSM. Without this parameter no link can be generated.
  • Second parameter: Optional text shown instead of or before the item id (see first parameter and optional id=yes).
  • id=yes: Optional parameter for appending the item id (in brackets) to the text from the second parameter.
  • icon=yes|no: Optional parameter to force or suppress the Wikidata icon. The default is yes if called with the second parameter (text), otherwise it is no (backward compatible).

Examples

Code Result Comment
with icon
{{Wikidata|Wikidata:Main Page|Wikidata}} [W]Wikidata links to Wikidata's main page
{{Wikidata|Q936|OSM}} [W]OSM for normal use in text
{{Wikidata|Q936|OSM|id= yes }} [W]OSM (Q936) text + item id
{{Wikidata|Q936|icon= yes }} [W]Q936 similar to {{Q}} and {{ValueDescription}}
{{Wikidata||OSM}} [W]OSM no link, just text
{{Wikidata|icon= yes }} [W] no link, no text
without icon
{{Wikidata|Q936|OSM|icon= no }} OSM for normal use in text
{{Wikidata|Q936|OSM|id= yes |icon= no }} OSM (Q936) text + item id
{{Wikidata||OSM|icon= no }} OSM just text, makes little sense
{{Wikidata|Q936}} Q936 initial version of this template
{{Wikidata}}

Related