Difference between revisions of "Template:GetLicense"

From blackwiki
Jump to navigation Jump to search
imported>Evolution and evolvability
imported>Evolution and evolvability
(better commenting)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<span class="plainlinks">[{{#invoke:wd|properties|{{#invoke:wd|properties|raw|{{{1|{{{Q|Q76846397}}}}}}|P275}}|P856}} {{#invoke:wd|properties|{{#invoke:wd|properties|raw|Q76846397|P275}}|P1813}}]</span><noinclude>{{doc}}</noinclude>
+
<span class="plainlinks">[{{#invoke:wd|properties|{{#invoke:wd|properties|raw|{{{1|{{{Q|<noinclude>Q76846397</noinclude>}}}}}}|P275}}|P856}} {{  <!-- Find the licence (P275) and link to its official website (P856) -->
 +
#if:{{#invoke:wd|properties|multilanguage|{{#invoke:wd|properties|raw|{{{1|{{{Q|<noinclude>Q76846397</noinclude>}}}}}}|P275}}|P1813}}            <!-- If licence's short name (P1813) is available... -->
 +
|{{#invoke:wd|properties|multilanguage|{{#invoke:wd|properties|raw|{{{1|{{{Q|<noinclude>Q76846397</noinclude>}}}}}}|P275}}|P1813}}              <!-- ...then use that short name  -->
 +
|{{#invoke:wd|properties|{{#invoke:wd|properties|raw|{{{1|{{{Q|<noinclude>Q76846397</noinclude>}}}}}}|P275}}|P2479}}                            <!-- ...otherwise use it's 'SPDX license ID' name (P2479) -->
 +
}}]</span><noinclude>{{doc}}</noinclude>

Latest revision as of 00:21, 10 October 2020

[Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value).]

50px Template documentation[view] [edit] [history] [purge]

Usage

Retrieve and format an item's Template:Property. The template will display display the licence's Template:Property or else its Template:Property and link out to its Template:Property.

Examples

  • {{GetLicense|Q=Q28651505}} → [Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value).]

See also