Template:Person: Difference between revisions
Jump to navigation
Jump to search
Rewrite infobox using core MediaWiki only (no ParserFunctions dependency) (via update-page on MediaWiki MCP Server) |
Upgrade infobox with ParserFunctions to hide empty fields (via update-page on MediaWiki MCP Server) |
||
| Line 2: | Line 2: | ||
|- | |- | ||
! colspan="2" style="background:#e8e8e8; font-size:120%; padding:0.4em;" | {{{name|{{PAGENAME}}}}} | ! colspan="2" style="background:#e8e8e8; font-size:120%; padding:0.4em;" | {{{name|{{PAGENAME}}}}} | ||
|- | {{#if:{{{image|}}}| | ||
! scope="row" style="width:40%; padding:0.3em; text-align:left;" | {{!}}- | ||
{{!}} colspan="2" style="text-align:center; padding:0.4em;" {{!}} [[File:{{{image}}}{{!}}frameless{{!}}200px{{!}}alt={{{caption|}}}]] | |||
|- | }} | ||
! scope="row" style="padding:0.3em; text-align:left;" | {{#if:{{{birth_date|}}}{{{birth_place|}}}| | ||
{{!}}- | |||
|- | ! scope="row" style="width:40%; padding:0.3em; text-align:left;" {{!}} Born | ||
! scope="row" style="padding:0.3em; text-align:left;" | {{!}} style="padding:0.3em;" {{!}} {{{birth_date|}}}{{#if:{{{birth_place|}}}|<br />{{{birth_place}}}}} | ||
}} | |||
{{#if:{{{death_date|}}}{{{death_place|}}}| | |||
! scope="row" style="padding:0.3em; text-align:left;" | {{!}}- | ||
! scope="row" style="padding:0.3em; text-align:left;" {{!}} Died | |||
{{!}} style="padding:0.3em;" {{!}} {{{death_date|}}}{{#if:{{{death_place|}}}|<br />{{{death_place}}}}} | |||
! scope="row" style="padding:0.3em; text-align:left;" | }} | ||
{{#if:{{{resting_place|}}}| | |||
{{!}}- | |||
! scope="row" style="padding:0.3em; text-align:left;" | ! scope="row" style="padding:0.3em; text-align:left;" {{!}} Buried | ||
{{!}} style="padding:0.3em;" {{!}} {{{resting_place}}} | |||
}} | |||
! scope="row" style="padding:0.3em; text-align:left;" | {{#if:{{{spouse|}}}| | ||
{{!}}- | |||
! scope="row" style="padding:0.3em; text-align:left;" {{!}} Spouse(s) | |||
! scope="row" style="padding:0.3em; text-align:left;" | {{!}} style="padding:0.3em;" {{!}} {{{spouse}}} | ||
}} | |||
{{#if:{{{parents|}}}| | |||
{{!}}- | |||
! scope="row" style="padding:0.3em; text-align:left;" {{!}} Parents | |||
{{!}} style="padding:0.3em;" {{!}} {{{parents}}} | |||
}} | |||
{{#if:{{{children|}}}| | |||
{{!}}- | |||
! scope="row" style="padding:0.3em; text-align:left;" {{!}} Children | |||
{{!}} style="padding:0.3em;" {{!}} {{{children}}} | |||
}} | |||
{{#if:{{{occupation|}}}| | |||
{{!}}- | |||
! scope="row" style="padding:0.3em; text-align:left;" {{!}} Occupation | |||
{{!}} style="padding:0.3em;" {{!}} {{{occupation}}} | |||
}} | |||
{{#if:{{{known_for|}}}| | |||
{{!}}- | |||
! scope="row" style="padding:0.3em; text-align:left;" {{!}} Known for | |||
{{!}} style="padding:0.3em;" {{!}} {{{known_for}}} | |||
}} | |||
|}</includeonly><noinclude> | |}</includeonly><noinclude> | ||
== Usage == | == Usage == | ||
<pre> | <pre> | ||
{{Person | {{Person | ||
| name | | name = | ||
| birth_date | | image = Example.jpg | ||
| birth_place = | | caption = | ||
| death_date | | birth_date = | ||
| death_place = | | birth_place = | ||
| death_date = | |||
| death_place = | |||
| resting_place = | | resting_place = | ||
| spouse | | spouse = | ||
| parents | | parents = | ||
| children | | children = | ||
| occupation | | occupation = | ||
| known_for | | known_for = | ||
}} | }} | ||
</pre> | </pre> | ||
All fields are optional. Empty fields are automatically hidden. | |||
[[Category:Infobox templates]] | [[Category:Infobox templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 12:47, 27 August 2026
Usage
{{Person
| name =
| image = Example.jpg
| caption =
| birth_date =
| birth_place =
| death_date =
| death_place =
| resting_place =
| spouse =
| parents =
| children =
| occupation =
| known_for =
}}
All fields are optional. Empty fields are automatically hidden.