Template:EditAtWikidata
Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
|
|
This template is used on 1,119,395 pages. To avoid large-scale disruption and unnecessary server load, any changes to this template should first be tested in its /sandbox or /testcases subpages, or in your own user space. The tested changes can then be added to this page in one single edit. Please consider discussing any changes on the talk page before implementing them. |
| Related pages |
|---|
| This template uses Lua: |
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
{{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
| Wikitext | Output | |
|---|---|---|
| With no parameters: | Lua error in package.lua at line 80: module 'Dev:Arguments' not found. | |
| Linking to a different Wikidata item: | Lua error in package.lua at line 80: module 'Dev:Arguments' not found. | |
| Linking to a specific property in an item: | Lua error in package.lua at line 80: module 'Dev:Arguments' not found. | |
| Suppressing the edit link: | Lua error in package.lua at line 80: module 'Dev:Arguments' not found. |
TemplateData
Link to an item on Wikidata, with a tooltip such as "Edit this at Wikidata".
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Property or claim ID | pid | 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).
| String | suggested |
| Non-breaking space | nbsp | Replaces the leading space with a non-breaking space
| Boolean | optional |
| Hide the edit-at-Wikidata link? | 1 | To prevent display of the Wikidata link. Useful for templates that add local overrides. | Boolean | optional |
| Item ID | qid | ID (Q-number) of the item to be edited at Wikidata.
| String | optional |
See also
- Template:EditOnWikidata, a similar template using text instead of an icon