Module:EditAtWikidata/doc
Jump to navigation
Jump to search
This is the documentation page for Module:EditAtWikidata
This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
This Lua module is used on approximately 1,130,000 pages. To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. Transclusion count updated automatically (see documentation). |
Related pages |
---|
Module 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.
- This message is only displayed if a local_parameter is not supplied, i.e. when called from a template, it can be coded not to display the message when a local parameter is in use, preventing the value form Wikidata being fetched.
- The qid of a Wikidata entry can optionally be supplied for testing outside the article.
Usage
To always display the icon:
{{#invoke:EditAtWikidata|showMessage}}
- Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
To display the icon depending on a local parameter not existing:
{{#invoke:EditAtWikidata|showMessage|local_parameter}}
To test the functionality outside of an article:
{{#invoke:EditAtWikidata|showMessage|qid=<ArticleID>|local_parameter}}
To make the link point to the given property at the Wikidata entry:
{{#invoke:EditAtWikidata|showMessage|pid=<PropertyID>|local_parameter}}
See also