Template:Pid/doc

This template, {{Pid}}, produces a uniform output of a Wikidata property's P-number, whether supplied the property label or its number (with or without the 'P' prefix) as the sole unnamed parameter. This makes it useful for constructing links to property pages since the Property namespace article titles are always the P-number that is output here.

Usage

edit
Template:Pid examples
Source wikitext Output Notes
{{Pid|instance of}} P31 Property labels work
{{Pid|P31}} P31 P-numbers too, the output's the same
{{Pid|31}} P31 Forgot the 'P' prefix? No problem.
{{Pid|nonexistent}} Can't fool me; if the input isn't valid, I shut up.
{{Pid|instance of|small=yes}} P31 Working in tight spaces? I can whisper my output.
{{Pid|P31|link=yes}} P31 Want the P-number to link to the property page? You got it.
{{Pid|invalid label|link=yes}} Invalid labels never generate output, even with formatting parameters present.
{{Pid|31|parens=yes}} (P31) It's cold out there, wrap that P-number up in parentheses or it'll catch a cold.
{{Pid|P31|link=yes|parens=yes|small=yes}} (P31) I love a good smörgåsbord. Doesn't everyone? Take one of everything!

TemplateData

edit
This is the TemplateData documentation for this template used by VisualEditor and other tools.

Pid

Uniformly outputs a Wikidata property's P-number, whether supplied the property name or its number (with or without the 'P' prefix) as the sole unnamed parameter

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Property1

Identifier for Wikidata property, either its label or numerical identifier (with or without 'P' prefix)

Example
language of work or name
Linerequired
Wikilinklink

The template output is wikilinked to the property's page if a truthy value is assigned here

Default
no
Example
yes
Booleanoptional
Parentheticalparens

The template output is wrapped in parentheses if a truthy value is assigned here

Default
no
Example
yes
Booleanoptional
Small fontsmall

The template's output uses a smaller font is a truthy value is assigned here

Default
no
Example
yes
Booleanoptional

See also

edit
Template Shorthand Example
{{Autodescription}} {{A}} totality consisting of space, time, matter and energy
{{Data}}
{{EntitySchema}} {{E}}
{{Label}} Douglas Adams
{{LinkedLabel}} Douglas Adams
{{Label and description}} {{LD}} Q42 (English science fiction writer and humorist (1952–2001))
{{Q}} Douglas Adams (Q42)
{{Q+}} Douglas Adams (Q42): English science fiction writer and humorist (1952–2001)
{{Q'}} Douglas Adams (Q42)  View with Reasonator View with SQID
{{Q''}} Douglas Adams (Q42)  View with Reasonator View with SQID
{{Q'''}} Douglas Adams (Q42)  View with Reasonator View with SQIDView profile on Scholia
{{Q!}} human : any member of Homo sapiens, unique extant species of the genus Homo, from embryo to adultDouglas Adams (Q42)
{{Q*}} human : any member of Homo sapiens, unique extant species of the genus Homo, from embryo to adultDouglas Adams (Q42): English science fiction writer and humorist (1952–2001)
{{QP}} instance of (P31) of Douglas Adams (Q42)
{{QT}} Douglas Adams (Q42)
{{Property}} {{P}}
{{P'}}
{{PT'}}
{{P+}}
{{Lexeme}} {{L}}
{{Claim}} {{C}}
{{Statement}} {{St}}
{{Statement+}}
{{EzStatement+}}
(Label in Taraškievica) {{Qbe-tarask}}

Дуглас Адамз(42)

(Label in English) {{Qen}} Q42(42)
(Label in French) {{Qfr}} Q42(42)
(Label in Italian) {{Qit}} Q42(42)
(Label in German) {{Qde}}

Q42(42)

(Label in Polish) {{Qpl}}

Q42(42)

(Label in Russian) {{Qru}}

Дуглас Адамс(42)

(Label in Ukrainian) {{Quk}}

Дуглас Адамс(42)

(Label in Spanish) {{Qes}}

Q42(42)

(Label in Chinese) {{Qzh}}

道格拉斯·亞當斯(42)

(Label in Shahmukhi) {{Qpnb}} ڈگلس ایڈمس(42)
(Label in Gurmukhi) {{Qpa}} ਡਗਲਸ ਐਡਮਸ(42)
(Label in Saraiki) {{Qskr}} ڈگلس ایڈمس(42)
(Label in Swedish) {{Qsv}} Q42(42)