Jump to content

Template:Person: Difference between revisions

From Amateur Theatre Wiki
add to template
Add wd
Line 1: Line 1:
<onlyinclude>{| class="float-right wikitable infobox" style="Tabellen-Attribute" id="template-infobox-person" summary="Infobox Person"
<onlyinclude>{| class="float-right wikitable infobox" style="Tabellen-Attribute" id="template-infobox-person" summary="Infobox Person"
|- class="hintergrundfarbe6
|- class="hintergrundfarbe6"
!colspan="2"| {{#if: {{{Name|}}}|{{{Name}}}|{{PAGENAME}} }}
!colspan="2"| {{#if: {{{Name|}}} | {{{Name}}} | {{#if: {{{qid|}}} | {{#invoke:WDfetch|getvalue|pid=P735}} {{#invoke:WDfetch|getvalue|pid=P734}} | {{PAGENAME}} }} }}
|-  
|-
{{#if:{{{Birthplace|}}} |
{{#if:{{{Birthplace|}}} |
{{!}} Birthplace {{!}}{{!}} {{{Birthplace}}}
{{!}} Birthplace {{!}}{{!}} {{{Birthplace}}}
| {{#if: {{{qid|}}} | {{!}} Birthplace {{!}}{{!}} {{#invoke:WDfetch|getvalue|pid=P19}} }}
{{!}}-
{{!}}-
}}
}}
{{#if:{{{Birthday|}}} |
{{#if:{{{Birthday|}}} |
{{!}} Birthday {{!}}{{!}} {{{Birthday}}}
{{!}} Birthday {{!}}{{!}} {{{Birthday}}}
| {{#if: {{{qid|}}} | {{!}} Birthday {{!}}{{!}} {{#invoke:WDfetch|getvalue|pid=P569}} }}
{{!}}-
{{!}}-
}}
}}
{{#if:{{{Death|}}} |
{{#if:{{{Death|}}} |
{{!}} Death {{!}}{{!}} {{{Death}}}
{{!}} Death {{!}}{{!}} {{{Death}}}
| {{#if: {{{qid|}}} | {{!}} Death {{!}}{{!}} {{#invoke:WDfetch|getvalue|pid=P570}} }}
{{!}}-
{{!}}-
}}
}}
{{#if:{{{Occupation|}}} |
{{#if:{{{Occupation|}}} |
{{!}} Occupation {{!}}{{!}} {{{Occupation}}}
{{!}} Occupation {{!}}{{!}} {{{Occupation}}}
| {{#if: {{{qid|}}} | {{!}} Occupation {{!}}{{!}} {{#invoke:WDfetch|getvalue|pid=P106}} }}
{{!}}-
{{!}}-
}}
}}
Line 24: Line 28:
{
{
"params": {
"params": {
"Name": {},
"Name": {
"type": "string",
"label": "Name of the person",
"description": "Override the name, otherwise fetches from Wikidata or uses the page title."
},
"Birthplace": {
"Birthplace": {
"type": "string"
"type": "string",
"label": "Birthplace of the person",
"description": "Override the birthplace, otherwise fetches from Wikidata."
},
},
"Birthday": {
"Birthday": {
"type": "date"
"type": "date",
"label": "Birthday of the person",
"description": "Override the birthday, otherwise fetches from Wikidata."
},
},
"Occupation": {
"Occupation": {
"type": "string"
"type": "string",
"label": "Occupation of the person",
"description": "Override the occupation, otherwise fetches from Wikidata."
},
"Death": {
"type": "string",
"label": "Death date of the person",
"description": "Override the death date, otherwise fetches from Wikidata."
},
},
"Death": {}
"qid": {
"type": "string",
"label": "Wikidata QID",
"description": "Wikidata QID to fetch all parameters dynamically from Wikidata."
}
},
},
"description": "Infobox for a person",
"description": "Infobox for a person. Accepts local values or fetches from Wikidata if a QID is provided.",
"format": "inline"
"format": "inline"
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Revision as of 23:44, 22 January 2025

Person

Infobox for a person. Accepts local values or fetches from Wikidata if a QID is provided.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Name of the personName

Override the name, otherwise fetches from Wikidata or uses the page title.

Stringoptional
Birthplace of the personBirthplace

Override the birthplace, otherwise fetches from Wikidata.

Stringoptional
Birthday of the personBirthday

Override the birthday, otherwise fetches from Wikidata.

Dateoptional
Occupation of the personOccupation

Override the occupation, otherwise fetches from Wikidata.

Stringoptional
Death date of the personDeath

Override the death date, otherwise fetches from Wikidata.

Stringoptional
Wikidata QIDqid

Wikidata QID to fetch all parameters dynamically from Wikidata.

Stringoptional