Template:Wikidata entity link

Revision as of 13:22, 31 August 2025 by Wikipedia>Jonesey95 (slight improvement when multiple ' characters are used in a label; more may be needed for other markup)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit "Template:Wikidata entity link/doc" to edit its documentation if it is available. (How does this work?)

Template:Wikidata entity link is used to get an automatically localized link to a Wikidata item or property.

Usage examples

Standard usage
{{Wikidata entity link}} → [[d:Special:EntityPage/Lua error in Module:Wd at line 633: attempt to index field 'wikibase' (a nil value).|Lua error in Module:Wd at line 633: attempt to index field 'wikibase' (a nil value). (Lua error in Module:Wd at line 633: attempt to index field 'wikibase' (a nil value).)]]
{{Wikidata entity link|1}} → Lua error in Module:Wd at line 633: attempt to index field 'wikibase' (a nil value). (Q1)
{{Wikidata entity link|Q1}} → Lua error in Module:Wd at line 633: attempt to index field 'wikibase' (a nil value). (Q1)
{{Wikidata entity link|P681}} → Lua error in Module:Wd at line 633: attempt to index field 'wikibase' (a nil value). (P681)
Leading/trailing white space
{{Wikidata entity link | 1 }} → Lua error in Module:Wd at line 633: attempt to index field 'wikibase' (a nil value). (Q1)
{{Wikidata entity link | Q1 }} → Lua error in Module:Wd at line 633: attempt to index field 'wikibase' (a nil value). (Q1)
{{Wikidata entity link | P681 }} → Lua error in Module:Wd at line 633: attempt to index field 'wikibase' (a nil value). (P681)
Lower case
{{Wikidata entity link | q1 }} → Lua error in Module:Wd at line 633: attempt to index field 'wikibase' (a nil value). (Q1)
{{Wikidata entity link | p681 }} → Lua error in Module:Wd at line 633: attempt to index field 'wikibase' (a nil value). (P681)
Template shortcuts
{{q|1}} → Lua error in Module:Wd at line 633: attempt to index field 'wikibase' (a nil value). (Q1)
{{wde|Q1}} → Lua error in Module:Wd at line 633: attempt to index field 'wikibase' (a nil value). (Q1)
{{wdq|P681}} → Lua error in Module:Wd at line 633: attempt to index field 'wikibase' (a nil value). (P681)

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Wikidata entity link in articles based on its TemplateData.

TemplateData for Wikidata entity link

No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
item or property number1

The letter P is required when linking to properties. The letter Q is optional when linking to items.

Example
Q42, 42, P23
Linesuggested

See also