• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:EditAtWikidata/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:EditAtWikidata
This is the template sandbox page for Template:EditAtWikidata (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
Shortcut
  • {{EAWTemplate:EAW}}
WarningThis template is used on approximately 853,000 pages, or roughly 1% of all pages.
To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them.
Related pages
  • Template
  • Template sandbox
  • Template testcases
  • Template doc
  • Template subpages
  • Module (talk)
  • Module sandbox
  • Module testcases
  • Module doc
  • Module subpages
This template uses Lua:
  • Module:EditAtWikidata (sandbox)

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).

Contents

  • 1 Usage
  • 2 Example
  • 3 TemplateData
  • 4 See also

Usage

edit
  • {{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

edit
Wikitext Output
With no parameters:
{{EditAtWikidata}}
Linking to a different Wikidata item:
{{EditAtWikidata|qid=Q42}}
Edit this at Wikidata
Linking to a specific property in an item:
{{EditAtWikidata|qid=Q42|pid=P735}}
Edit this at Wikidata
Suppressing the edit link:
{{EditAtWikidata|value}}

TemplateData

edit

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

edit
  • Template:EditOnWikidata, a similar template using text instead of an icon
The above documentation is transcluded from Template:EditAtWikidata/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:EditAtWikidata/sandbox&oldid=855580977"
Last edited on 19 August 2018, at 10:36

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 19 August 2018, at 10:36 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop