Content deleted Content added
→Usage: probably better for readability |
→Usage: Function getQualifierValue |
||
Line 13:
<nowiki>{{#invoke:WikidataIB |getCoords |name=<fieldname> |suppressfields=<list of fields which will never display> |fetchwikidata=<list of fields to fetch values from Wikidata> |<local parameter>}}</nowiki>
<nowiki>{{#invoke:WikidataIB |getQualifierValue |<PropertyID> |pval=<ID of target value for the property> |qual=<qualifier ID for that target value> |name=<fieldname> |suppressfields=<list of fields which will never display> |fetchwikidata=<list of fields to fetch values from Wikidata> |onlysourced=<yes/no>}}</nowiki>
=== Function getValue ===
Line 53 ⟶ 55:
* The blacklist is passed in the named parameter {{para|suppressfields}}
* The whitelist is passed in the named parameter {{para|fetchwikidata}}
=== Function getQualifierValue ===
The getQualifierValue is for use when we want to fetch the value of a qualifier. We need to know the property and the value of the property that it qualifies. The parameters are:
* The property ID passed in the unnamed parameter (or {{para|1}})
* The target value for that property in {{para|pval}}
* The qualifier ID for that target value in {{para|qual}}
* The name of the field where its called from to implement whitelisting and blacklisting of the property in
* The list of fields to be fetched ("whitelist") in {{para|fetchwikidata}} - accepts {{para|fetchwikidata|ALL}} to fetch all fields
* Optional list of fields not to be displayed ("blacklist") in {{para|suppressfields}}
* Optional boolean to specify whether only sourced values of the property are returned (defaults to "no") in {{para|onlysourced}}
* Optional item ID for arbitrary access (expensive call!) in {{para|qid}}
== Coding into an infobox ==
|