Template:Wikidata URL
{{#property:P856|from=}}
Usage[edit source]
Converts URLs from Wikidata of the format http:// to http:// so that they can be used to generate external links.
{{Wikidata URL|1=URL}}
{{Wikidata URL|P=Wikidata ID or title of URL property|from=Wikidata ID of source entity}}
- Parameter
|1=
, URL, is optional. If included, the specified URL will be converted to http://, and all other parameters will be ignored. - Parameter
|P=
, if specified, is the ID or name of the property that contains the URL. If it is not specified, it defaults to Lua error in Module:Wikibase at line 40: attempt to index field 'wikibase' (a nil value). (P856). - Parameter
|from=
, if specified, is the ID of the Wikidata entity to fetch the URL property from. If it is not specified, it defaults to the current page.
Examples[edit source]
{{Wikidata URL|1={{#property:P1630|from=p830}}}}
→ {{#property:P1630|from=p830}}
{{Wikidata URL|P=formatter URL|from=P830}}
→ {{#property:formatter URL|from=P830}}
{{Wikidata URL|P=P1630|from=P830}}
→ {{#property:P1630|from=P830}}
{{Wikidata URL|from=Q328}}
→ {{#property:P856|from=Q328}}
{{Wikidata URL}}
(when placed on https://en.wikipedia.org/wiki/English_Wikipedia) → {{#property:P856|from=Q328}}
{{Wikidata URL|1={{#property:P1630|from=p830}}|P=P856|from=Q328}}
→ {{#property:P1630|from=p830}} (|P=
and |from=
are ignored)
See also[edit source]
- {{wikidata}}. If
|from=
is set, then the output of this template is identical to{{wikidata|property|raw|fromEntity|P856}}
- {{Wikidata ID line}}
- {{Wikidata property link}}
- {{Wikidata entity link}}
- Meta:Wikidata/Notes/Inclusion syntax v0.4
External links[edit source]
- Template:Wikidata URL at Wikipedia, the free Terran-based encyclopedia that anyone can edit.
The above documentation is transcluded from Template:Wikidata URL/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |