ਮੌਡਿਊਲ:WikidataIdentifiers/doc
This is the documentation page for ਮੌਡਿਊਲ:WikidataIdentifiers
This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
Functions for use in retrieving Wikidata for use in templates that deal with identifiers
- getIdentifierQualifier returns the value of a qualifier for an Identifier
Functions
ਸੋਧੋgetIdentifierQualifier
ਸੋਧੋThis returns the value of a qualifier for an identifier such as (P1367).
There is an assumption is that one value exists for the property, and only one qualifier exists for that value.
Constraint violations for (P1367) are at d:Wikidata:Databasereports/Constraintviolations/P1367 #Single_value
Usage
ਸੋਧੋNormally use like this within a template for use in the article concerned:
{{#invoke:WikidataIdentifiers |getIdentifierQualifier |<property> |qual=<qualifier>}}
If used outside of the related article, an expensive version of the call is available:
{{#invoke:WikidataIdentifiers |getIdentifierQualifier |<property> |qual=<qualifier> |qid=<Q-value for target in Wikidata}}
Examples
ਸੋਧੋRetrieving the (P1114) qualifier for the (P1367) within an article:
{{#invoke:WikidataIdentifiers |getIdentifierQualifier |P1367 |qual=P1114}}
Retrieving the (P1114) qualifier for the (P1367) for (Q5083334) outside of the article:
{{#invoke:WikidataIdentifiers |getIdentifierQualifier |P1367 |qual=P1114 |qid=Q5083334}}
→