模板:Wikidata URL/doc

維基百科,自由的百科全書
跳至導覽 跳至搜尋

用法[編輯]

轉換維基數據的http://格式URL到http://,以便用於生成外部連結。

{{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 未安裝 Extension:Wikibase ?.
  • 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.

範例[編輯]

{{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)

另見[編輯]