Template:EditAtWikidata/doc

From MOASSpedia
Jump to navigation Jump to search

Template to display an icon with a tooltip such as "Edit this at Wikidata"

  • Icon will be linked to the Wikidata entry for the article where this is placed.
  • The link can be modified to point to a specific property in the Wikidata entry by supplying the optional named parameter |pid=.
  • This message is only displayed if a local_parameter is not supplied; i.e. when called from within a template, it can be coded not to display the icon when a local parameter is in use, which means the value from Wikidata is not used.
  • The qid of a Wikidata entry can optionally be supplied for testing outside the article (this is an expensive call).

Usage

  • {{EditAtWikidata}}

Outside the article:

  • {{EditAtWikidata |qid=<Qid of article at Wikidata>}}

Inside another template:

  • {{EditAtWikidata |{{{local_parameter|}}} }}

To make the link point to the given propertyID at the Wikidata entry:

  • {{EditAtWikidata |pid=<PropertyID> |local_parameter}}

Example

Usage:

Template:EditAtWikidata{{EditAtWikidata}}

Output:

Template:EditAtWikidataLua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).

Wikitext:

Template:EditAtWikidata<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-0">Lua error in Module:EditAtWikidata at line 29: attempt to index field &#039;wikibase&#039; (a nil value).</span></strong>

TemplateData

No description.

Template parameters

ParameterDescriptionTypeStatus
Local parameter1

Local parameter, which if supplied will override this template

Stringoptional
QIDqid

Q item ID of the item to be edited at Wikidata

Unknownoptional
PIDpid

Property ID of the property to be edited at Wikidata

Unknownoptional
Non-breaking spacenbsp

Replaces the leading space with a non-breaking space

Auto value
yes
Booleanoptional

See also