Difference between revisions of "Template:DescriptionWD/doc"

From blackwiki
Jump to navigation Jump to search
imported>RexxS
(note arbitrary access makes an ''expensive'' call)
imported>John of Reading
m (→‎top: Typo fixing, replaced: either either → either)
 
Line 2: Line 2:
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
  
When placed on an article page, it displays either either the text of the first unnamed parameter or the item description from Wikidata if there is no parameter.
+
When placed on an article page, it displays either the text of the first unnamed parameter or the item description from Wikidata if there is no parameter.
  
 
For testing it can accept a named parameter {{para|qid}} which allows the description to be fetched from an arbitrary article by its Wikidata id. This makes it an ''expensive'' call.
 
For testing it can accept a named parameter {{para|qid}} which allows the description to be fetched from an arbitrary article by its Wikidata id. This makes it an ''expensive'' call.

Latest revision as of 07:02, 20 June 2019

When placed on an article page, it displays either the text of the first unnamed parameter or the item description from Wikidata if there is no parameter.

For testing it can accept a named parameter |qid= which allows the description to be fetched from an arbitrary article by its Wikidata id. This makes it an expensive call.

Usage

For example, on the article Priyanka Chopra it will display:

  • {{DescriptionWD}}Lua error in Module:RexxS at line 132: attempt to index field 'wikibase' (a nil value).
  • {{DescriptionWD |Indian actor and singer}} → Indian actor and singer