Modèle:WikidataOI/Documentation

This version of {{Wikidata}} includes an opt-in toggle (i.e. |fetch=true), hence the name {{WikidataOI}}.|seealso=*{{Wikidata}}, the same template but without the opt-in toggle.|extraparams=fetch=true|section=

Opt-in toggle

modifier

The opt-in toggle is a convenience feature to allow data from Wikidata only to be fetched when explicitly requested. It consists of two named flags, which are name-value pairs (i.e. |flag=value), that can be given anywhere inside the call. The default behaviour (i.e. if the flags are not given or left empty) is not to fetch data from Wikidata. Note that a value consisting merely out of whitespace is also considered empty. The following table describes their usage.

Named flag Default Description
fetch= Used to request data to be fetched from Wikidata.

Any non-empty value assigned to this flag (e.g. |fetch=true, |fetch=false, |fetch=arbitrary) will trigger the template to fetch data from Wikidata, but only if the ifeq flag is not given or empty.

If the ifeq flag is given and not empty, then the value assigned to this flag must be equal to the value of the ifeq flag to trigger the template to fetch data from Wikidata.

The default behaviour is not to fetch data from Wikidata.

ifeq= Adds a constraint to the value that the fetch flag must have before it triggers the template to fetch data from Wikidata.

If the value assigned to this flag is non-empty, then data from Wikidata is only fetched if the fetch flag has the same value (e.g. |fetch=true |ifeq=true will trigger the template to fetch data, whereas |fetch=false |ifeq=true will not).