Template:Wikidata entity link: Difference between revisions
Jump to navigation
Jump to search
Richardpruen (talk | contribs) m 1 revision imported: Wikipedia article on Nicotine templates needed |
Richardpruen (talk | contribs) m 1 revision imported: Templates and CSS files |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#if: {{{1|}}} | <includeonly>{{#if:{{{1|}}} | ||
| {{#switch | | {{#switch:{{padleft:|1|{{uc:{{{1}}}}}}} | ||
| Q | P = [[d:Special:EntityPage/{{ | | Q | P = [[d:Special:EntityPage/{{uc:{{{1}}}}}|{{#invoke:wd|label|{{uc:{{{1}}}}}}} <small>({{uc:{{{1}}}}})</small>]] | ||
| #default = [[d:Special:EntityPage/Q{{ | | #default = [[d:Special:EntityPage/Q{{uc:{{{1}}}}}|{{#invoke:wd|label|Q{{uc:{{{1}}}}}}} <small>(Q{{uc:{{{1|}}}}})</small>]] | ||
}} | }} | ||
| {{#if:{{#invoke:wd|label|raw}} | | {{#if:{{#invoke:wd|label|raw}} |
Latest revision as of 19:27, 4 December 2022
This template uses Lua: |
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}}
→ (no entity){{Wikidata entity link|1}}
→ test (Q1){{Wikidata entity link|Q1}}
→ test (Q1){{Wikidata entity link|P681}}
→ (P681)
- Leading/trailing white space
{{Wikidata entity link | 1 }}
→ test (Q1){{Wikidata entity link | Q1 }}
→ test (Q1){{Wikidata entity link | P681 }}
→ (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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
item or property number | 1 | The letter P is required when linking to properties. The letter Q is optional when linking to items.
| Line | suggested |
See also
- d:Template:Q
- d:Template:Property
- {{Get QID|<Wikipedia page title>}}
- {{Label}}
- {{LinkedLabel}}
- {{Wikidata fallback link}}
- {{Wikidata property}}
- {{Wikidata property link}}
- {{Authority control}}
- {{QID}}