Content deleted Content added
update for new title |
→Example:spouse: offer alternative for use in infobox |
||
Line 20:
* <code><nowiki>{{#invoke:Wikidata|getValue|p26|[[Hillary Clinton]]}}</nowiki></code> = returns [[Hillary Clinton]], allowing an infobox to use a local value rather than the value stored in Wikidata.
=== Example in Infobox template ===
Inside an infobox definition, it may be called like this:
* <code><nowiki>| data55 = {{#invoke:Wikidata|getValue|p26|{{{spouse|FETCH_WIKIDATA}}} }}</nowiki></code>
Line 26 ⟶ 27:
# display the linked value(s) from Wikidata if the infobox parameter <code>|spouse</code> is not supplied
# display the local infobox parameter <code>|spouse</code> if it is supplied (e.g. <code>"|spouse = Hillary Clinton"</code>)
Optionally, it could be called as:
* <code><nowiki>| data55 = {{#invoke:Wikidata|getValue|p26|{{{spouse|}}} }}</nowiki></code>
which should behave as the parameter does now, unless the parameter is set to FETCH_WIKIDATA when it displays the linked value(s) fetched from Wikidata.
=== Example:birth place ===
|