Difference between revisions of "Template:Label/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(update examples)
Line 6: Line 6:
  
 
; Standard usage
 
; Standard usage
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}}}</code> → {{{{BASEPAGENAME}} }}
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|Q5}}</code> → {{{{BASEPAGENAME}}|Q5}}
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|Q5}}</code> → {{{{BASEPAGENAME}}|Q5}}
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|P31}}</code> → {{{{BASEPAGENAME}}|P31}}
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}|P31}}</code> → {{{{BASEPAGENAME}}|P31}}
  
; Leading/trailing whitespace
+
; Leading/trailing white space
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | Q5 }}</code> → {{{{BASEPAGENAME}} | Q5 }}
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | Q5 }}</code> → {{{{BASEPAGENAME}} | Q5 }}
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | P31 }}</code> → {{{{BASEPAGENAME}} | P31 }}
 
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | P31 }}</code> → {{{{BASEPAGENAME}} | P31 }}
 +
 +
; Lower case
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | q5 }}</code> → {{{{BASEPAGENAME}} | q5 }}
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | p31 }}</code> → {{{{BASEPAGENAME}} | p31 }}
  
 
== See also ==
 
== See also ==

Revision as of 03:27, 19 January 2019

This template gets the label of a Wikidata item or property.

Usage examples

Standard usage
{{Label}}Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value).
{{Label|Q5}}Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value).
{{Label|P31}}Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value).
Leading/trailing white space
{{Label | Q5 }}Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value).
{{Label | P31 }}Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value).
Lower case
{{Label | q5 }}Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value).
{{Label | p31 }}Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value).

See also