Difference between revisions of "Template:Wikidata entity link"

From blackwiki
Jump to navigation Jump to search
test>Zyxw
(Trim any leading or trailing spaces from unnamed parameter that would prevent template from working as expected.)
m (16 revisions imported)
 
(11 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{#switch:{{str left|{{{1|}}}|1}}
+
<includeonly>{{#if: {{{1|}}}
| Q = [[d:{{#if:1|{{{1|}}}}}|{{label|{{#if:1|{{{1|}}}}}}} <small>({{#if:1|{{{1|}}}}})</small>]]
+
| {{#switch: {{uc:{{padleft:|1|{{#if:1|{{{1}}}}}}}}}
| P = [[d:Property:{{#if:1|{{{1|}}}}}|{{label|{{#if:1|{{{1|}}}}}}} <small>({{#if:1|{{{1|}}}}})</small>]]
+
  | Q | P = [[d:Special:EntityPage/{{#if:1|{{{1}}}}}|{{#invoke:wd|label|{{{1}}}}} <small>({{#if:1|{{{1}}}}})</small>]]
| [[d:Q{{#if:1|{{{1|}}}}}|{{label|Q{{#if:1|{{{1|}}}}}}} <small>(Q{{#if:1|{{{1|}}}}})</small>]]
+
  | #default = [[d:Special:EntityPage/Q{{#if:1|{{{1}}}}}|{{#invoke:wd|label|Q{{#if:1|{{{1}}}}}}} <small>(Q{{#if:1|{{{1|}}}}})</small>]]
}}<noinclude>
+
  }}
{{documentation}}
+
| {{#if:{{#invoke:wd|label|raw}}
</noinclude>
+
  | [[d:Special:EntityPage/{{#invoke:wd|label|raw}}|{{#invoke:wd|label}} <small>({{#invoke:wd|label|raw}})</small>]]
 +
  | <small>(no entity)</small>
 +
  }}
 +
}}</includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 11:29, 7 September 2020

Template documentation[create]