Module:WikidataIB/doc: Difference between revisions

Content deleted Content added
m Overview: Typo fixing, replaced: the the → the
Line 380:
* <code>spf → suppressfields</code>
* <code>wdl → wdlinks</code>
 
=== Parameter sets ===
Generally, <code>getValue</code> has a set of defaults for its parameters that represent consensus decisions by editors. For example, {{para|onlysourced}} defaults to <code>true</code> so only Wikidata values that are sourced to something better than "Wikipedia" will be returned, and {{para|fetchwikidata}} defaults to <code>none</code> so nothing is returned until it is enabled by setting some field names or "ALL". This represents the fail-safe condition and allows infoboxes to be made Wikidata-capable without changing any article until enabled ''for that article''.
 
To simplify the use of <code>getValue</code> in other circumstances, common combinations of parameters can be specified with {{para|parameterset}} or its alias {{para|ps}} for convenience. Two combinations are implemented at present and these are:
;ps=1 : a common set of overrides to get a simple value, linked where possible:
* rank = "best"
* fetchwikidata = "ALL"
* onlysourced = "no"
* noicon = "true"
;ps=2 : a sort of raw value in plain text:
* rank = "best"
* fetchwikidata = "ALL"
* onlysourced = "no"
* noicon = "true"
* linked = "no"
* plaindate = "true"
Other sets could be created if there is a demand.
 
=== Wrapper template ===