Difference between revisions of "Template:Examine Wikidata item/doc"

From blackwiki
Jump to navigation Jump to search
imported>RexxS
(→‎Usage: expand examples)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 +
{{Lua|Module:WikidataIB}}
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
A wrapper template for the examine call in [[Module:WikidataIB]].
 
A wrapper template for the examine call in [[Module:WikidataIB]].
Line 22: Line 23:
 
* <code><nowiki>{{examine |qid=Q1396889 |P18}}</nowiki></code>
 
* <code><nowiki>{{examine |qid=Q1396889 |P18}}</nowiki></code>
 
* <code><nowiki>{{examine |Q1396889 |P18}}</nowiki></code>
 
* <code><nowiki>{{examine |Q1396889 |P18}}</nowiki></code>
 
+
* <code><nowiki>{{examine |P18}}</nowiki></code> (if used in the [[Animal Farm]] article)
 +
* <code><nowiki>{{examine Wikidata item |pid=P18 |qid=Q1396889}}</nowiki></code>
 +
* <code><nowiki>{{#invoke:WikidataIB |examine |P18 |Q1396889}}</nowiki></code>
 
Result:
 
Result:
 
 
{{examine |P18 |Q1396889}}
 
{{examine |P18 |Q1396889}}
  
 
== See also ==
 
== See also ==
 
* {{tl|Dump}}
 
* {{tl|Dump}}
 +
* [[Module:Dump]]
  
 
<includeonly>{{sandbox other||
 
<includeonly>{{sandbox other||

Latest revision as of 22:30, 5 December 2020

A wrapper template for the examine call in Module:WikidataIB.

The template takes two parameters: the propertyID and the entityID. These may be unnamed or given as |pid= and |qid= or any combination.

The propertyID must begin with "P" and the entityID must begin with "Q".

If the entityId is omitted, the template will look at Wikidata for the entity connected to the current page.

Usage

Example
Examining Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (Q1396889) Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P18)

All of the following produce the same result:

  • {{examine |pid=P18 |qid=Q1396889}}
  • {{examine |P18 |qid=Q1396889}}
  • {{examine |pid=P18 |Q1396889}}
  • {{examine |P18 |Q1396889}}
  • {{examine |qid=Q1396889 |pid=P18}}
  • {{examine |Q1396889 |pid=P18}}
  • {{examine |qid=Q1396889 |P18}}
  • {{examine |Q1396889 |P18}}
  • {{examine |P18}} (if used in the Animal Farm article)
  • {{examine Wikidata item |pid=P18 |qid=Q1396889}}
  • {{#invoke:WikidataIB |examine |P18 |Q1396889}}

Result: Lua error in Module:WikidataIB at line 3063: attempt to index field 'wikibase' (a nil value).

See also