Content deleted Content added
m replace deprecated "Image:" with "File:" |
consistency |
||
(3 intermediate revisions by one other user not shown) | |||
Line 110:
=== Testing spouse ===
Copy and paste the following into any article and preview it (please don't save!):
<syntaxhighlight lang="
* - {{#invoke:Wikidata|getValue|P26|}}
* - {{#invoke:Wikidata|getValue|P26|FETCH_WIKIDATA}}
Line 141:
=== Testing birthplace ===
Copy and paste the following into any article and preview it (please don't save!):
<syntaxhighlight lang="
* - {{#invoke:Wikidata|getValue|P19|}}
* - {{#invoke:Wikidata|getValue|P19|FETCH_WIKIDATA}}
Line 150:
=== Testing getValue, getRawValue and getDateValue ===
Copy and paste the following into any article and preview it (please don't save!):
<syntaxhighlight lang="wikitext">
* - {{#invoke:Wikidata|getValue|P19|FETCH_WIKIDATA}}
* - {{#invoke:Wikidata|getValue|P26|FETCH_WIKIDATA}}
Line 159:
* - {{#invoke:Wikidata|getDateValue|P569|FETCH_WIKIDATA|mdy}}
* - {{#invoke:Wikidata|getDateValue|P569|FETCH_WIKIDATA|y}}
</syntaxhighlight>
This should return the Wikidata values for birthplace, spouse, citizenship, religion, gender, date of birth (twice) and year of birth, if they exist. The dob is first in dmy format and then in mdy.
=== Testing dates BC/BCE ===
Copy and paste the following into a short section of article such as [[Horace #See also]] and preview it (please don't save!):
<syntaxhighlight lang="wikitext">
* - {{#invoke:Wikidata|getDateValue|P569|FETCH_WIKIDATA|y}}
* - {{#invoke:Wikidata|getDateValue|P569|FETCH_WIKIDATA|y|BCE}}
</syntaxhighlight>
This should return 65 BC and 65 BCE, respectively.
|