Module:EditAtWikidata/doc: Difference between revisions
Appearance
Content deleted Content added
→Usage: update documenttion |
Mr. Ibrahem (talk | contribs) No edit summary |
||
Line 10: | Line 10: | ||
To always display the icon: |
To always display the icon: |
||
* <code><nowiki>{{#invoke:EditAtWikidata|showMessage}}</nowiki></code> |
* <code><nowiki>{{#invoke:EditAtWikidata|showMessage}}</nowiki></code> |
||
:{{#invoke:EditAtWikidata|showMessage}} |
|||
To display the icon depending on a local parameter not existing: |
To display the icon depending on a local parameter not existing: |
||
* <code><nowiki>{{#invoke:EditAtWikidata|showMessage|local_parameter}}</nowiki></code> |
* <code><nowiki>{{#invoke:EditAtWikidata|showMessage|local_parameter}}</nowiki></code> |
||
:{{#invoke:EditAtWikidata|showMessage|local_parameter}} |
|||
To test the functionality outside of an article: |
To test the functionality outside of an article: |
||
* <code><nowiki>{{#invoke:EditAtWikidata|showMessage|qid=<ArticleID>|local_parameter}}</nowiki></code> |
* <code><nowiki>{{#invoke:EditAtWikidata|showMessage|qid=<ArticleID>|local_parameter}}</nowiki></code> |
||
:{{#invoke:EditAtWikidata|showMessage|qid=<ArticleID>|local_parameter}} |
|||
To make the link point to the given property at the Wikidata entry: |
To make the link point to the given property at the Wikidata entry: |
||
* <code><nowiki>{{#invoke:EditAtWikidata|showMessage|pid=<PropertyID>|local_parameter}}</nowiki></code> |
* <code><nowiki>{{#invoke:EditAtWikidata|showMessage|pid=<PropertyID>|local_parameter}}</nowiki></code> |
||
:{{#invoke:EditAtWikidata|showMessage|pid=<PropertyID>|local_parameter}} |
|||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | |
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | |
||
<!-- Categories below this line, please; interwikis at Wikidata --> |
<!-- Categories below this line, please; interwikis at Wikidata --> |
Revision as of 15:34, 27 November 2016
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}}
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}}