模板:Wikidata

被永久保護的模板
維基百科,自由的百科全書
文件圖示 模板文件[檢視] [編輯] [歷史] [清除快取]

此模板旨在從維基數據獲取數據鏈接至維基百科條目,附帶多個功能。

用法

{{wikidata|命令1|标记1a|标记1b|标记1c|命令2|标记2a|标记2b|标记2c|标记0a|标记0b|标记0c|参数1|参数2|参数3}}

命令

命令(命令1, 命令2, ...)確定返回值的類型。一次調用只能包含單個類的命令。

聲稱類

聲稱類命令可以組合,意味着可以一次給出該類不同類型的多個命令。

將多個命令組合到一個對此template的調用中,而非使用單個命令多次調用此template,以確保所有返回的信息屬於彼此。

類型 命令 返回 基本用法 描述
I property 首個匹配[a] {{wikidata|property|P1}} 從當前項目-實體或給定實體返回請求的屬性或屬性列表。
properties 所有匹配 {{wikidata|properties|P1}}
II qualifier 首個匹配[a] {{wikidata|qualifier|P1|P2}} 從當前項目-實體的給定屬性或給定實體返回請求的限定符或限定符列表。

與其他聲稱類命令不同,此命令可以多次給出以便在一次調用中檢索不同的限定符。

qualifiers 所有匹配 {{wikidata|qualifiers|P1|P2}}
III reference 首個匹配[a] {{wikidata|reference|P1}} 從當前項目-實體的給定屬性或給定實體返回參考或參考列表。[b]
references 所有匹配 {{wikidata|references|P1}}
  1. ^ 1.0 1.1 1.2 僅返回單個值而不是多個(如果多個聲稱或語句匹配)。返回的值是從等級最高的聲稱中找到的第一個匹配項。
  2. ^ 僅返回根據維基數據來源指南有效的參考(即至少具有 載於 (P248)來源網址 (P854) 屬性的參考)

通用類

通用類命令無法組合。

類型 命令 返回 基本用法 描述
I label {{wikidata|label}} 如果存在的話,返回當前項目-實體或給定實體的標籤。
II title {{wikidata|title}} 如果存在此類頁面的話,返回鏈接到當前項目實體或給定項目實體的頁面標題。
III description {{wikidata|description}} 如果存在的話,返回當前項目-實體或給定實體的描述。
IV alias 首個匹配[a] {{wikidata|alias}} 如果存在的話,返回當前項目-實體或給定實體的別名或別名列表。
aliases 所有匹配 {{wikidata|aliases}}
V badge 首個匹配[a] {{wikidata|badge}} 如果存在此類頁面的話,返回鏈接到當前項目-實體或給定項目-實體的徽章或徽章列表。
badges 所有匹配 {{wikidata|badges}}
  1. ^ 1.0 1.1 如果存在多個值的話,僅返回單個值。


標記

以下(可選)標記可用於更改此template的行為。它們必須在(第一個)命令和另一個參數之前給出。

為方便起見,允許使用空標誌(即||),這種寫法會被忽略。

命令標記

這些標記(标记1*, 标记2*, ...)適用於直接位於它們前面的命令。

標記 描述
linked 如果存在的話,創建指向維基百科條目的鏈接,該條目連接到屬性或限定符。還可鏈接至度量單位(可附加值)。

如果省略此參數,則將返回純屬性或限定符值。

short [昂贵] 如果存在的話,返回任意實體的 簡稱 (P1813)

如果不是這種情況,則默認返回實體的標籤。

raw 如果適用,返回原始值。

如果此標記與項目或屬性數據類型一起使用,則返回Q標識符或P標識符。

對於數量數據類型,此標記將移除任何度量單位,除非給出 unit 標記,在這種情況下將返回原始度量單位(其Q標識符)。

如果此標記與時間數據類型一起使用,則返回的日期將採用 yyyy-mm-dd(如 1731-02-11 )或 yyyy-mmyyyy 格式,具體取決於日期的精度。要使用儒略曆日期可將 /Julian 附加到輸出(如 1731-02-11/Julian,可以使用{{#titleparts}} 模板功能分成幾個部分)。

如果它與地球坐標數據類型一起使用,則它將在返回值中用正斜槓替換各種符號(如 52/5/3/N/4/19/3/E,可以使用{{#titleparts}} 模板功能分成幾個部分)。

multilanguage 返回任何一種可用語言的文本值,不局限於當前維基語言。
unit 僅返回數量數據類型的度量單位。

配置標記

這些標記(flag0*)是通用配置標記,可以在第一個命令之後的任意地方給出(但需在其他參數前)。

標記 命令類 描述
組合 preferred 聲稱 為所選聲稱設定等級約束。

前三個標記設定將選擇約束的等級,可選擇在後面添加 +-,例如 normal+preferred-,其中前者選擇具有「正常」(normal)等級「或更高」等級的聲稱,後者選擇具有「首選」(preferred)等級「或更低」等級的聲稱。要得到各個等級的聲稱,使用 preferred-deprecated+

如果另外給出 best 標記,那麼只返回所選聲稱中等級最高的聲稱。

默認為 normal+|best(因此默認情況下,永遠不會返回具有「已棄用」(deprecated)等級的聲稱)。

無論是否設置了這些標記,始終按從高到低的等級輸出。

normal
deprecated
best
組合 future 聲稱 為所選聲稱設置時間約束。使用 始於 (P580)終於 (P582) 聲稱限定符來確定聲稱是否對所選時間段有效。

默認為 future|current|former(因此默認情況下,返回對任何時間段有效的聲稱)。

current
former
single 聲稱 如果有多個聲稱匹配的話,僅返回單個聲稱。如果給出了 property/properties 命令,則此標記無效。在這種情況下,該標記是多餘的。
sourced 聲稱 僅返回至少具有一個有效參考的聲稱。
單一 edit 聲稱、通用 在輸出後添加可點擊圖標,讀者可以使用該圖標編輯維基數據上返回的聲稱。

如果使用 edit@end ,則圖標將放置於行尾,以便在信息框中整齊排列。

edit@end

參數

參數確定抓取的所有返回值的來源。

位置參數

下表按固定順序顯示了可用的位置參數(参数*)。對於每個命令,都會標記適用的參數集。如果給出了多個命令,則適用的參數集是各集合的併集。例如,如果已給出命令 propertiesqualifiers,那麼至少應給出 property_idqualifier_id 兩個參數。

可以給出多個 qualifier/qualifiers 命令。這些帶有標記的命令的順序與給定的相應 qualifier_id 參數的順序相匹配。

(必要) (可選) (可選) (必要) (可選) (必要) (必要)
{{wikidata 命令 標記 entity_id property_id raw_value qualifier_id qualifier_id }}
label, title,
description,
alias/aliases,
badge/badges
property/properties
reference/references
qualifier/qualifiers
qualifier/qualifiers (可選 2nd, 3rd 等)

下面是所有位置參數的描述。

參數 描述
entity_id

(optional)

[昂贵] 要訪問的項目實體的Q標識符(如 Q55)或要訪問的屬性-實體的帶由前綴Property:P標識符(或是可用的別名)(如 Property:P38)。

如果是通用類命令,可以省略P標識符前綴Property:(如 P38)。

如果省略此參數,則使用連接到當前頁面的項目-實體(除非給出 eid=,見下文)。如果給出此參數但為空(如 ||),那麼依據它的位置,此字段會被解釋為空標記,因此被忽略。另見下面的eid= 命名參數,也可用於提供實體ID,但不會出現連接到當前頁面的項目-實體被用作此特定情況的結果。

property_id 要訪問的實體內的屬性的P標識符(或是可用的別名),無前綴 Property:(如 P35)。
raw_value

(optional)

Either the Q標識符 equal to the property value (e.g. Q29574) or a literal value (i.e. string or quantity etc., no entity label) equal to the raw property value of the particular claim to be accessed.

Dates as literal values must be formatted yyyy-mm-dd (e.g. 1731-02-11) for dates with a precision of days, yyyy-mm (e.g. 1731-02) for dates with a precision of months, and yyyy (e.g. 1731) for dates of lesser precision. Dates BCE require a minus sign in front of the year (e.g. -2950-01-31). Dates stored in the Julian calendar must have /Julian attached to the end (e.g. 1731-02-11/Julian). Decades like the 2010s must be given as 2010 (but the 2010s BCE as -2019), centuries like the 20th century as 1901 (but the 20th century BCE as -2000), and millenniums like the 3rd millennium as 2001 (but the 3rd millennium BCE as -3000).

Globe coordinates as literal values must be formatted with forward slashes (i.e. /) between the parts and no symbols (e.g. 52/5/3/N/4/19/3/E) without any spaces or leading zeros.

The special type 'no value' can be given by entering the empty string (i.e. ||) and the special type 'unknown value' can be given by entering a single underscore (i.e. |_|). To get a literal underscore, escape it by placing a backslash \ directly in front of it (i.e. \_); the same holds for a literal backslash (i.e. \\).

要獲得豎線 |,使用 {{!}}|

如果省略此參數, 將訪問該屬性中的所有聲稱(匹配任何其他約束)。

qualifier_id 要訪問的實體內的限定符的P標識符(或是可用的別名),無前綴 Property:(如 P580)。

命名參數

下面是對所有命名參數的描述,這些參數是name-value對(即 |name=value)。這些都是可選的,可以在任何地方給出 inside the call。

參數 描述
eid= [EXPENSIVE] 該參數提供與 positional argument entity_id 相同的功能(如 |eid=Q55), 有一點不同:如果給出了參數但是它的值是空的(如 |eid=),那麼不會有任何實體,而不是連接到當前頁面的項目實體。這在需要變量entity-ID的某些情況下很有用,但是不應將連接到當前頁面的項目實體作為默認值進行訪問。

此外對於所有命令的P標識符,可以省略前綴 Property:(如 |eid=P38)。

僅當省略位置參數 entity_id 時,此參數才有效。

<qualifier>= The <qualifier> is a placeholder for a set of arguments that determine which claims should be accessed based on qualifier value, analogous to the pair of positional arguments property_id and raw_value that determine access based on property value.

As such, <qualifier> is any qualifier's P-identifier (or an available alias) without the Property: prefix (e.g. P518). Its value is either the Q-identifier equal to one of the qualifier values (e.g. Q27561) or a literal value (i.e. string or quantity etc., no entity label) equal to one of the raw qualifier values of the particular claim to be accessed. The value format is the same as for the positional argument raw_value. The special type 'no value' given by the empty string also matches the total absence within the claim of the particular qualifier.

Example: |P518=Q27561

Multiple arguments of this type can be given to match multiple qualifier values simultaneously for each claim.

屬性別名

屬性別名是可以替代使用的P標識符的名稱。以下屬性別名(大小寫敏感)目前可用:

別名
P標識符
coord P625
image P18
author P50
publisher P123
importedFrom P143
statedIn P248
pages P304
language P407
publicationDate P577
startTime P580
endTime P582
chapter P792
retrieved P813
referenceURL P854
sectionVerseOrParagraph P958
archiveURL P1065
title P1476
formatterURL P1630
quote P1683
shortName P1813
archiveDate P2960
inferredFrom P3452
typeOfReference P3865
column P3903

高級用法

可以通過使用多個命名標誌來定製具有單數和複數形式(e.g. property/properties)的(組合)命令的輸出布局,這些標誌是name-value對(即 |flag=value ),可以在調用內部的任意地方給出。下表列出了可用的命名標誌。

要在 value 的開頭或結尾插入空格,使用下劃線 _。要獲得文字下劃線,請通過在其前面(i.e. \_)直接放置反斜槓\;對於文字反斜槓(i.e. \\)也是如此。要獲得文字豎線|,使用{{!}} or &#124;

命名標誌 默認值 默認條件 描述
format= %p[%s][%r] 如果 property/properties 命令 was given and the qualifier/qualifiers command was not given 單一聲稱的格式。可用參數如下。
參數 描述
%p 聲稱屬性值由 property/properties 命令施加。
%q1, %q2, %q3, ... 聲稱的限定符值或限定符值列表由相應的 qualifier/qualifiers 命令施加。
%q The collection of the qualifier values applied by each qualifier/qualifiers command (i.e. %q1 + %q2 + %q3 + ...). If only one qualifier/qualifiers command was given, then this parameter is equivalent to %q1.
%r 聲稱的參考資料值或參考資料值列表由 reference/references 命令施加。
%a 實體的別名由 alias/aliases 命令施加。
%b 實體的頁面badge badge/badges 命令施加。
%s 可移動的分隔符占位符。這是一個特殊參數,不由命令施加,但是在每對聲稱之間自動填寫(如果返回索賠列表)。This is handy in case a reference is returned as well, since it allows the reference to be placed after the punctuation mark as prescribed by Wikipedia's manual of style. 默認值為頓號(),可以使用 sep%s 標誌覆蓋(見下文)。

可選參數可以通過將它們封裝在方括號之間來給出: [...]。僅當找到在相同括號之間定義的每個可選參數的值時,才會顯示方括號之間的所有內容。可選內容也可以嵌套。

使用兩個直接相互對應的開口方括號(i.e. [[),使用use {{!((}}

必須至少給出一個非可選參數,同時 %s 參數必須始終定義為可選參數。

To get a literal [, ], % or \, escape the character by placing a backslash \ directly in front of it (e.g. \%). 有關更多信息,另請參閱此表正上方的說明。

%q[%s][%r] 如果 property/properties command was not given and the qualifier/qualifiers command was given
%r 如果 only the reference/references command was given
%p[ <span style="font-size:85\%">(%q)</span>][%s][%r] 如果 property/properties command was given and the qualifier/qualifiers command was given
%a[%s] 如果 alias/aliases command was given
%b[%s] 如果 badge/badges command was given
sep= _ default The fixed separator between each pair of claims.
if only the reference/references command was given without the raw flag
sep%s= , default The movable separator between each pair of claims. This will be the value of the %s parameter applied to all claims except for the last in the list.
; 如果 property/properties command was not given and the qualifier/qualifiers command was given
sep%q1=, sep%q2=, sep%q3=, ... ,_ default 單個聲稱的每對限定符之間的分隔符。These are the value separators for the %q1, %q2, %q3, ... parameters.

If only one qualifier/qualifiers command was given, then the sep%q1 flag is equivalent to sep%q.

sep%q= ,_ 如果只有一個 qualifier/qualifiers 命令已經給出 The separator between each set of qualifiers of a single claim. This is the value separator for the %q parameter.

If only one qualifier/qualifiers command was given, then this flag is equivalent to sep%q1.

;_ 如果超過一個 qualifier/qualifiers 命令已經給出
sep%r= default 單個聲稱的每對引用之間的分隔符。這是值分隔符,為 %r 參數。
_ 如果 raw flag was given for the reference/references 命令
punc= default 標點符號位於輸出的末尾。這將放在 %s 參數上,適用於列表中的最後一個聲稱。

當輸出用作句子的一部分時,這允許在標點符號後面放置任何引用。

範例

參數和輸出類型 例子 描述
Q55 = "荷蘭", P395 = "車牌代碼"

[string]

{{wikidata|property|Q55|P395}}

NL
獲取文字字符串值。
P395 = "車牌代碼"

[string]

{{wikidata|property|P395}}

NL
如果 template is transcluded on the 荷蘭 頁面(鏈接到Q55),那麼 Q55 可被忽略。
Q55 = "荷蘭", P395 = "NL"

[string]

{{wikidata|property|eid=Q55|P395}}

NL
也可以使用 eid= 參數給出entity-ID。
Q55 = "荷蘭", P395 = "車牌代碼"

[string]

{{wikidata|property|edit|Q55|P395}}

NL在維基數據編輯
添加可點擊的圖標,用於編輯維基數據上的返回值。
Q55 = "荷蘭", P395 = "車牌代碼"

[string]

{{wikidata|property|edit@end|Q55|P395}}

NL在維基數據編輯
將編輯圖標置於行尾。
Q55 = "荷蘭", P1082 = "人口"

[quantity]

{{wikidata|property|normal+|Q55|P1082}}

17,590,672
從具有「normal」等級或更高等級的聲稱中獲取單個屬性值。
Q55 = "荷蘭", P1082 = "人口"

[quantity]

{{wikidata|properties|normal+|Q55|P1082}}

17,590,672、10,026,773、16,779,575、16,829,289、17,000,000、17,081,507、17,181,084、17,282,163、17,407,585
從具有「normal」等級或更高等級的聲稱中獲取多個屬性值。
Q55 = "荷蘭", P1082 = "人口", P585 = "時間點"

[quantity], [time]

{{wikidata|properties|qualifier|normal+|Q55|P1082|P585}}

17,590,672 (2022年1月1日)、10,026,773 (1950)、16,779,575 (2013)、16,829,289 (2014年8月26日)、17,000,000 (2016年3月21日)、17,081,507 (2017年1月1日)、17,181,084 (2018年1月1日)、17,282,163 (2019年1月1日)、17,407,585 (2020年1月1日)
獲取每個聲稱的單個限定符值,屬性值除外。
Q55 = "荷蘭", P1082 = "人口", P585 = "時間點"

[quantity], [time], [reference]

{{wikidata|properties|qualifier|references|normal+|Q55|P1082|P585}}

17,590,672 (2022年1月1日)[1]10,026,773 (1950)[2]16,779,575 (2013)[2]16,829,289 (2014年8月26日)[3]17,000,000 (2016年3月21日)[4]17,081,507 (2017年1月1日)[5]17,181,084 (2018年1月1日)[1]17,282,163 (2019年1月1日)[1]17,407,585 (2020年1月1日)[1]
獲取每個聲稱的引用。
Q55 = "荷蘭", P1082 = "人口"

[quantity], [reference]

A total of {{wikidata|property|references|Q55|P1082}} people live in the Netherlands.

A total of 17,590,672[1] people live in the Netherlands.
獲取具有引用的屬性。
Q55 = "荷蘭", P1082 = "人口"

[quantity], [reference]

The Netherlands has a population of {{wikidata|property|references|Q55|P1082|punc=.}}

The Netherlands has a population of 17,590,672.[1]
在輸出的末尾添加一個標點符號,位於引用之前。
Q55 = "荷蘭", P1082 = "人口", P585 = "時間點"

[quantity], [time], [reference]

<ul>{{wikidata|properties|qualifier|references|normal+|Q55|P1082|P585|format=<li>%p[%r][<ul><li>%q</li></ul>]</li>}}</ul>

  • 17,590,672[1]
    • 2022年1月1日
  • 10,026,773[2]
    • 1950
  • 16,779,575[2]
    • 2013
  • 16,829,289[3]
    • 2014年8月26日
  • 17,000,000[4]
    • 2016年3月21日
  • 17,081,507[5]
    • 2017年1月1日
  • 17,181,084[1]
    • 2018年1月1日
  • 17,282,163[1]
    • 2019年1月1日
  • 17,407,585[1]
    • 2020年1月1日
以自定義格式返回輸出。
Q55 = "荷蘭", P1082 = "人口", P585 = "時間點"

[time]

{{wikidata|qualifier|normal+|Q55|P1082|P585}}

2022年1月1日;1950;2013;2014年8月26日;2016年3月21日;2017年1月1日;2018年1月1日;2019年1月1日;2020年1月1日
默認情況下,為每個聲稱獲取一個限定符,用於多個匹配的聲稱。
Q55 = "荷蘭", P1082 = "人口", P585 = "時間點"

[time]

{{wikidata|qualifier|normal+|single|Q55|P1082|P585}}

2022年1月1日
要僅針對單個聲稱獲得單個限定符,需同時提供 single 標誌,以便僅訪問單個聲稱。
Q55 = "荷蘭", P1082 = "人口", P585 = "時間點"

[time]

{{wikidata|qualifier|Q55|P1082|10026773|P585}}

1950
從與給定文字值匹配的(原始)屬性值的聲稱中獲取限定符。
Q55 = "荷蘭", P1082 = "人口", P585 = "時間點"

[time]

{{wikidata|qualifier|mdy|Q55|P1082|10026773|P585}}

以月 - 日 - 年獲取日期。
Q55 = "荷蘭", P1082 = "人口", P585 = "時間點"

[time]

{{wikidata|qualifier|raw|Q55|P1082|10026773|P585}}

1950
獲取原始日期值。
Q55 = "荷蘭", P1082 = "人口"

[reference]

{{wikidata|references|Q55|P1082|10026773}}

[2]
獲取特定聲稱的引用。
Q55 = "荷蘭", P1082 = "人口"

[reference]

{{wikidata|references|raw|Q55|P1082|10026773}}

CBS StatLine - Bevolking; kerncijfers. 荷蘭中央統計局. [2015年8月22日]. (原始內容存檔於2015年8月27日). 
以原始形式獲取特定聲稱的引用。
Q55 = "荷蘭", P2855 = "增值稅率", P518 = "適用部分"

[entity label]

{{wikidata|qualifier|Q55|P2855|P518}}

食物
獲取單個限定符值(對於每個匹配的聲稱)。
Q55 = "荷蘭", P2855 = "增值稅率", P518 = "適用部分"

[entity label]

{{wikidata|qualifiers|Q55|P2855|P518}}

食物、醫療藥物、輔具、雜誌、書本、藝術、文物、髮型師、酒店、露營場、休閒、體育、水
獲取多個限定符值(對於每個匹配的聲稱)。
Q55 = "荷蘭", P2855 = "增值稅率", P518 = "適用部分"

[quantity], [entity label]

{{wikidata|properties|qualifiers|Q55|P2855|P518}}

21%、6% (食物、醫療藥物、輔具、雜誌、書本、藝術、文物、髮型師、酒店、露營場、休閒、體育、水)
獲取多個屬性值以及多個限定符值。
Q55 = "荷蘭", P2855 = "增值稅率", P518 = "適用部分"

[quantity], [entity label]

{{wikidata|properties|qualifiers|Q55|P2855|P518|sep=_+_|sep%s=|sep%q=_/_}}

21% + 6% (食物 / 醫療藥物 / 輔具 / 雜誌 / 書本 / 藝術 / 文物 / 髮型師 / 酒店 / 露營場 / 休閒 / 體育 / 水)
使用自定義分隔符返回輸出。
Q55 = "荷蘭", P35 = "國家元首", P580 = "始於", P582 = "終於"

[entity label], [time]

{{wikidata|properties|qualifier|qualifier|normal+|Q55|P35|P580|P582}}

威廉-亞歷山大 (2013年4月30日)、貝婭特麗克絲 (1980年4月30日;2013年4月30日)、朱麗安娜女王 (1948年9月4日;1980年4月30日)、威廉明娜 (1890年11月23日;1948年9月4日)、威廉三世 (1849年3月17日;1890年11月23日)、威廉二世 (1840年10月7日;1849年3月17日)、威廉一世 (尼德蘭) (1815年3月16日;1840年10月7日)
為每個聲稱獲取兩個不同的限定符值。
Q55 = "荷蘭", P35 = "國家元首", P580 = "始於", P582 = "終於"

[entity label], [time]

{{wikidata|properties|qualifier|qualifier|normal+|Q55|P35|P580|P582|sep%q=_–_}}

威廉-亞歷山大 (2013年4月30日)、貝婭特麗克絲 (1980年4月30日 – 2013年4月30日)、朱麗安娜女王 (1948年9月4日 – 1980年4月30日)、威廉明娜 (1890年11月23日 – 1948年9月4日)、威廉三世 (1849年3月17日 – 1890年11月23日)、威廉二世 (1840年10月7日 – 1849年3月17日)、威廉一世 (尼德蘭) (1815年3月16日 – 1840年10月7日)
使用自定義分隔符返回輸出。
Q55 = "荷蘭", P35 = "國家元首", P580 = "始於", P582 = "終於"

[entity label], [time]

{{wikidata|properties|qualifier|qualifier|normal+|Q55|P35|P580|P582|format=%p[ <span style="font-size:85\%">(%q1[ – %q2])</span>][%s][%r]}}

威廉-亞歷山大 (2013年4月30日)、貝婭特麗克絲 (1980年4月30日 – 2013年4月30日)、朱麗安娜女王 (1948年9月4日 – 1980年4月30日)、威廉明娜 (1890年11月23日 – 1948年9月4日)、威廉三世 (1849年3月17日 – 1890年11月23日)、威廉二世 (1840年10月7日 – 1849年3月17日)、威廉一世 (尼德蘭) (1815年3月16日 – 1840年10月7日)
以自定義格式而不是自定義分隔符返回輸出。
Q55 = "荷蘭", P35 = "國家元首", P580 = "始於", P582 = "終於"

[entity label], [time]

{{wikidata|properties|qualifier|qualifier|normal+|Q55|P35|P580|P582|format=%p[ <span style="font-size:85\%">([<![]--%q2]since [%q2--[]>]%q1[ – %q2])</span>][%s][%r]}}

威廉-亞歷山大 (since 2013年4月30日)、貝婭特麗克絲 (1980年4月30日 – 2013年4月30日)、朱麗安娜女王 (1948年9月4日 – 1980年4月30日)、威廉明娜 (1890年11月23日 – 1948年9月4日)、威廉三世 (1849年3月17日 – 1890年11月23日)、威廉二世 (1840年10月7日 – 1849年3月17日)、威廉一世 (尼德蘭) (1815年3月16日 – 1840年10月7日)
要僅在某個值不存在時添加文本,例如如果沒有結束時間,則添加單詞「'since',需將其包裝在包含HTML注釋標籤和相關參數的兩個可選塊之間(這也可以防止將文本添加到頁面源中)。
Q55 = "荷蘭", P35 = "國家元首", Q29574 = "貝婭特麗克絲", P580 = "始於", P582 = "終於"

[entity label], [time]

{{wikidata|properties|qualifier|raw|qualifier|normal+|Q55|P35|Q29574|P580|P582|format=%p[ <span style="font-size:85\%">(%q1[ – %q2])</span>][%s][%r]}}

貝婭特麗克絲 (1980-04-30 – 2013年4月30日)
獲取具有限定符的屬性,來自聲稱,其屬性與給定的Q標識符匹配,其中一個限定符值採用其原始形式。
Q55 = "荷蘭", P38 = "貨幣", P518 = "適用部分"

[entity label]

{{wikidata|properties|qualifiers|normal+|current|Q55|P38|P518}}

歐元 (歐洲區尼德蘭)、美元 (荷蘭加勒比區)
獲取當前有效的聲稱。
Q55 = "荷蘭", P38 = 貨幣", P518 = "適用部分"

[entity label]

{{wikidata|properties|linked|qualifiers|normal+|current|Q55|P38|P518}}

歐元 (歐洲區尼德蘭)美元 (荷蘭加勒比區)
獲取具有鏈接屬性值的聲稱。
Q55 = "荷蘭", P38 = 貨幣", P518 = "適用部分"

[entity label]

{{wikidata|properties|qualifiers|linked|normal+|current|Q55|P38|P518}}

歐元 (歐洲區尼德蘭)、美元 (荷蘭加勒比區)
獲取具有鏈接限定符值的聲稱。
Q55 = "荷蘭", P38 = 貨幣", P518 = "適用部分"

[entity label]

{{wikidata|properties|linked|short|qualifiers|linked|normal+|current|Q55|P38|P518}}

歐元 (歐洲區尼德蘭)美元 (荷蘭加勒比區)
獲取具有鏈接屬性和限定符值的聲稱,並在可用時使用短屬性值。
Q55 = "荷蘭", P38 = 貨幣", Q4917 = "美元", P518 = "適用部分"

[entity label]

{{wikidata|qualifiers|normal+|current|Q55|P38|Q4917|P518}}

荷蘭加勒比區
獲取限定符,來自與給定Q標識符匹配的(原始)屬性值的聲稱。Gets qualifiers from claims for which the (raw) property value matches a given Q-identifier.
Q55 = "荷蘭", P38 = 貨幣", P518 = "適用部分", Q27561 = "荷蘭加勒比區"

[entity label]

{{wikidata|properties|normal+|current|Q55|P38|P518=Q27561}}

美元
Gets properties from claims for which a (raw) qualifier value matches a given Q-identifier.
Q55 = "荷蘭", P38 = 貨幣"

[entity label]

{{wikidata|properties|normal+|former|Q55|P38}}

荷蘭盾
獲取過去有效的聲稱。
Q55 = "荷蘭", P38 = 貨幣"

[entity label]

{{wikidata|properties|raw|normal+|former|Q55|P38}}

Q788472
獲取原始屬性值。
Q55 = "荷蘭", P38 = 貨幣"

[entity label]

{{wikidata|properties|raw|linked|normal+|former|Q55|P38}}

Q788472
獲取鏈接到維基數據的原始屬性值。
Q55 = "荷蘭", P1549 = "居民稱謂詞"

[monolingual text]

{{wikidata|property|Q55|P1549}}

獲取當前維基語言的單語言文本值。
Q55 = "荷蘭", P1549 = "居民稱謂詞", P407 = "作品或名稱使用語言", Q36846 = "道本語"

[monolingual text]

{{wikidata|property|multilanguage|Q55|P1549|P407=Q36846}}

獲取任何可用語言的單語言文本值。
Q55 = "荷蘭", P2884 = "市電電壓"

[quantity]

{{wikidata|property|Q55|P2884}}

230 伏特
獲取數量值及其關聯的度量單位。
Q55 = "荷蘭", P2884 = "市電電壓"

[quantity]

{{wikidata|property|linked|Q55|P2884}}

230 伏特
獲取具有鏈接測量單位的數量值。
Q55 = "荷蘭", P2884 = "市電電壓"

[quantity]

{{wikidata|property|raw|Q55|P2884}}

230
獲取原始數量值。
Q55 = "荷蘭", P2884 = "市電電壓"

[quantity]

{{wikidata|property|unit|Q55|P2884}}

伏特
僅獲取測量單位。
Q55 = "荷蘭", P2884 = "市電電壓"

[quantity]

{{wikidata|property|unit|raw|Q55|P2884}}

Q25250
獲取原始測量單位。
Q55 = "荷蘭", P625 = "地理坐標"

[globe coordinate]

{{wikidata|property|Q55|P625}}

52°19'N, 5°33'E
獲取globe坐標值。
Q55 = "荷蘭", P625 = "地理坐標"

[globe coordinate]

{{wikidata|property|linked|Q55|P625}}

52°19'N, 5°33'E
獲取鏈接的globe坐標值。
Q55 = "荷蘭", P625 = "地理坐標"

[globe coordinate]

{{wikidata|property|raw|Q55|P625}}

52/19/N/5/33/E
獲取原始globe坐標值。
Q55 = "荷蘭", P625 = "地理坐標"

[globe coordinate]

{{wikidata|property|Q55|coord}}

52°19'N, 5°33'E
可以使用屬性別名代替P標識符。
Q55 = "荷蘭", P41 = "旗幟圖像"

[commons media]

{{wikidata|property|linked|Q55|P41}}

Flag of the Netherlands.svg
獲取媒體文件名並將其鏈接至共享資源。
Q55 = "荷蘭", P41 = "旗幟圖像"

[commons media]

{{wikidata|property|raw|Q55|P41|format=\[\[File:%p {{!}} thumb {{!}} left\]\]}}

可以在頁面上包含共享資源媒體文件通過省略 linkedraw 標誌,但通過使用 raw 標誌 它可以自由格式化。
Q915684 = "勞侖茲-勞侖次方程", P2534 = "公式定義"

[math]

{{wikidata|property|Q915684|P2534}}

獲取一個數學表達式。
Q6256 = "國家", P3896 = "地理形狀"

[geographic shape]

{{wikidata|property|linked|Q6256|P3896}}

Data:Naturalearthdata.com/admin-0-countries-no-antarctica.map
獲取地理形狀數據文件名並將其鏈接至共享資源。
Q4917 = "美元"

[entity label]

{{wikidata|label|Q4917}}

美元
獲取item的標籤。
Q4917 = "美元"

[entity label]

{{wikidata|label|short|linked|Q4917}}

美元
獲取item的簡短鏈接標籤。
P38 = 貨幣"

[entity label]

{{wikidata|label|P38}}

貨幣
獲取屬性的標籤。
P38 = 貨幣"

[entity label]

{{wikidata|label|linked|P38}}

貨幣
獲取鏈接到維基數據的屬性標籤。
Q776 = "烏得勒支省"

[entity label]

{{wikidata|label|Q776}}

烏得勒支省
獲取item的標籤。
Q776 = "烏得勒支省"

[entity label]

{{wikidata|label|linked|Q776}}

烏得勒支省
獲取item的鏈接標籤。


[entity label]

{{wikidata|label}}

烏得勒支省
如果 template is transcluded on the 烏得勒支省 page (which is linked to Q776), then the Q776 can be omitted.


[entity label]

{{wikidata|label|raw}}

Q776
如果只給出 label 命令與 raw 標誌, 那麼返回連接到當前頁面的item的Q標識符。
Q776 = "烏得勒支省"

[page title]

{{wikidata|title|Q776}}

烏得勒支省
獲取當前Wiki上頁面的標題,鏈接到給定項目。
Q776 = "烏得勒支省"

[page title]

{{wikidata|title|linked|Q776}}

烏得勒支省
獲取當前Wiki上頁面的鏈接標題,鏈接到給定項目。


[page title]

{{wikidata|title}}

烏得勒支省
如果 template is transcluded on the 烏得勒支省 page (which is linked to Q776), then the Q776 can be omitted.
Q55 = "荷蘭"

[entity description]

{{wikidata|description|Q55}}

歐洲國家,荷蘭王國本土部分
獲取item的描述。


[entity description]

{{wikidata|description}}

歐洲國家,荷蘭王國本土部分
如果 template is transcluded on the 荷蘭 頁面(鏈接至Q55),那麼 Q55 可以忽略。
Q55 = "荷蘭"

[entity alias]

{{wikidata|alias|Q55}}

尼德蘭
獲取item的別名之一。
Q55 = "荷蘭"

[entity alias]

{{wikidata|aliases|Q55}}

尼德蘭、尼德蘭王國、紅毛蕃、和蘭
獲取item的所有別名。
Q55 = "荷蘭"

[entity alias]

{{wikidata|alias|linked|Q55}}

尼德蘭
獲取鏈接別名從item。


[entity alias]

{{wikidata|alias}}

尼德蘭
If the template is transcluded on the 荷蘭 page (which is linked to Q55), then the Q55 can be omitted.
Q2 = "地球"

[page badge]

{{wikidata|badges|Q2}}

優良條目
獲取當前Wiki上頁面的raw badges,鏈接到給定item。
Q2 = "地球"

[page badge]

{{wikidata|badges|raw|Q2}}

Q17437798
獲取當前Wiki上頁面的raw badges,鏈接到給定item。


[page badge]

{{wikidata|badges}}

優良條目
If the template is transcluded on the 地球 page (which is linked to Q2), then the Q2 can be omitted.

示例參考

  1. ^ 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 Bevolking; kerncijfers, 1950-2022. 
  2. ^ 2.0 2.1 2.2 2.3 2.4 CBS StatLine - Bevolking; kerncijfers. 荷蘭中央統計局. [2015年8月22日]. (原始內容存檔於2015年8月27日). 
  3. ^ 3.0 3.1 CBS StatLine - Bevolking; kerncijfers. [2014年8月26日]. (原始內容存檔於2014年9月3日). 
  4. ^ 4.0 4.1 Nederland telt 17 miljoen inwoners. 2016年3月21日. 
  5. ^ 5.0 5.1 Bevolking; kerncijfers, 1950-2022. [2023年3月18日]. 

參見