Module:WikidataIB/sandbox1/doc: Difference between revisions

Content deleted Content added
Other main functions: document getValueByQual and getValueByLang
Line 323:
 
=== Function getLink ===
getLink has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid=
getLink returns the label for a Qid wiki-linked to the local article (if the article exists). If label doesn't exist, it returns the Qid wiki-linked to the local article (if the article exists).
 
If there is a sitelink to an article on the local Wiki, it returns a link to the article with the Wikidata label as the displayed text.
If there is no sitelink, it returns the label as plain text.
If there is no label in the local language, it displays the qid instead.
: Wikidata: {{q|Q29016906}} and {{q|Q3621491}}
* <code><nowiki>{{#invoke:WikidataIB |getLink |Q29016906}}</nowiki></code> → {{#invoke:WikidataIB |getLink |Q29016906}}