• Home
  • Random
  • Log in
  • Settings
  • About Startupidia
  • Disclaimers
Startupidia

Template:EditAtWikidata/sandbox

  • Language
  • Watch
  • View source
< Template:EditAtWikidata
__EXPECTUNUSEDTEMPLATE__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
  • {{EAW}}
WarningThis template is used on approximately 847,000 pages, or roughly 28928% 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

  • {{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: <syntaxhighlight lang="wikitext">{{EditAtWikidata}}</syntaxhighlight>
Linking to a different Wikidata item: qid=Q42}}</syntaxhighlight>
Linking to a specific property in an item: qid=Q42|pid=P735}}</syntaxhighlight>
Suppressing the edit link: value}}</syntaxhighlight>

TemplateData

<templatedata> { "params": { "1": { "label": "Hide the edit-at-Wikidata link?", "description": "To prevent display of the Wikidata link. Useful for templates that add local overrides.", "type": "boolean" }, "qid": { "label": "Item ID", "description": "ID (Q-number) of the item to be edited at Wikidata.", "example": "Q42", "type": "string", "default": "ID of the current page." }, "pid": { "label": "Property or claim ID", "description": "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", "type": "string", "suggested": true }, "nbsp": { "label": "Non-breaking space", "description": "Replaces the leading space with a non-breaking space", "type": "boolean", "autovalue": "yes" } }, "paramOrder": [ "pid", "nbsp", "1", "qid" ], "format": "inline", "description": "Link to an item on Wikidata, with a tooltip such as \"Edit this at Wikidata\"." } </templatedata>

See also

  • 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 "http://startupidia.org/index.php?title=Template:EditAtWikidata/sandbox&oldid=2979"
Last edited on 22 May 2025, at 10:05

Languages

      This page is not available in other languages.

      Startupidia
      • This page was last edited on 22 May 2025, at 10:05.
      • Privacy policy
      • About Startupidia
      • Disclaimers
      • Contact us
      • Desktop