• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Wikidata URL

  • Template
  • Talk
  • Language
  • Watch
  • View source
Template documentation[view] [edit] [history] [purge]

Usage

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 official website (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

{{Wikidata URL|1={{#property:P1630|from=p830}}}} → https://eol.org/pages/$1

{{Wikidata URL|P=formatter URL|from=P830}} → https://eol.org/pages/$1

{{Wikidata URL|P=P1630|from=P830}} → https://eol.org/pages/$1

{{Wikidata URL|from=Q328}} → https://en.wikipedia.org/

{{Wikidata URL}} (when placed on https://en.wikipedia.org/wiki/English_Wikipedia) → https://en.wikipedia.org/

{{Wikidata URL|1={{#property:P1630|from=p830}}|P=P856|from=Q328}} → https://eol.org/pages/$1 (|P= and |from= are ignored)

See also

  • {{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
The above documentation is transcluded from Template:Wikidata URL/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Wikidata_URL&oldid=804521131"
Last edited on 9 October 2017, at 15:33

Languages

    • العربية
    • भोजपुरी
    • বাংলা
    • کوردی
    • Cymraeg
    • Magyar
    • 日本語
    • Македонски
    • मराठी
    • Bahasa Melayu
    • ਪੰਜਾਬੀ
    • Papiamentu
    • Română
    • Scots
    • တႆး
    • සිංහල
    • Српски / srpski
    • ᥖᥭᥰ ᥖᥬᥲ ᥑᥨᥒᥰ
    • Oʻzbekcha / ўзбекча
    • Tiếng Việt
    • 中文
    Wikipedia
    • Wikimedia Foundation
    • Powered by MediaWiki
    • This page was last edited on 9 October 2017, at 15:33 (UTC).
    • Page was rendered with Parsoid.
    • Content is available under CC BY-SA 4.0 unless otherwise noted.
    • Privacy policy
    • About Wikipedia
    • Disclaimers
    • Contact Wikipedia
    • Legal & safety contacts
    • Code of Conduct
    • Developers
    • Statistics
    • Cookie statement
    • Terms of Use
    • Desktop view