Template:Edit at Wikidata

Revision as of 14:02, 22 January 2026 by Wikipedia>MSGJ (MSGJ moved page Template:EditAtWikidata to Template:Edit at Wikidata: plain English)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit "Template:Edit at Wikidata/doc" to edit its documentation if it is available. (How does this work?)

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 (or part thereof) in the Wikidata entry by supplying the optional named parameter |pid=.
  • This message is only displayed if parameter |1=} is empty; i.e. when called from within a template, it can be coded not to display the icon, which means the value from Wikidata is not used.
  • The Wikidata ID can optionally be supplied for testing outside the article (this is an expensive call).

Usage

  • {{Edit at Wikidata}}

Outside the article:

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

Inside another template:

  • {{Edit at Wikidata |{{{local_parameter|}}} }}

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

  • {{Edit at Wikidata |pid=<PropertyID> |local_parameter}}

Example

Wikitext Output
With no parameters:
{{Edit at Wikidata}}
Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
Linking to a different Wikidata item:
{{Edit at Wikidata|qid=Q42}}
Lua error in Module:EditAtWikidata at line 30: attempt to index field 'wikibase' (a nil value).
Linking to a specific property in an item:
{{Edit at Wikidata|qid=Q42|pid=P735}}
Lua error in Module:EditAtWikidata at line 30: attempt to index field 'wikibase' (a nil value).
Suppressing the edit link:
{{Edit at Wikidata|value}}

TemplateData

Link to an item on Wikidata, with a tooltip such as "Edit this at Wikidata".

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Property or claim IDpid

ID of the property to be edited at Wikidata. Can also be a 'claim ID', to link to a particular value within a property (when there are multiple).

Example
P1082
Stringsuggested
Non-breaking spacenbsp

Replaces the leading space with a non-breaking space

Auto value
yes
Booleanoptional
Hide the edit-at-Wikidata link?1

To prevent display of the Wikidata link. Useful for templates that add local overrides.

Booleanoptional
Item IDqid

ID (Q-number) of the item to be edited at Wikidata.

Default
ID of the current page.
Example
Q42
Stringoptional

See also