Template:Person: Difference between revisions

From Koen Family Research Log
Jump to navigation Jump to search
Rewrite infobox with HTML table to fix parser-function expansion (via update-page on MediaWiki MCP Server)
Trim whitespace artifacts from {{#if}} block closures (via update-page on MediaWiki MCP Server)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><table class="infobox" style="float:right; clear:right; width:22em; margin:0 0 1em 1em; border:1px solid #a2a9b1; background:#f8f9fa; font-size:88%; line-height:1.4; border-collapse:collapse;">
<includeonly>{| class="infobox" style="float:right; clear:right; width:22em; margin:0 0 1em 1em; border:1px solid #a2a9b1; background:#f8f9fa; font-size:88%; line-height:1.4; border-collapse:collapse;"
<tr><th colspan="2" style="background:#e8e8e8; font-size:120%; padding:0.4em;">{{{name|{{PAGENAME}}}}}</th></tr>
|-
{{#if:{{{image|}}}|<tr><td colspan="2" style="text-align:center; padding:0.4em;">[[File:{{{image}}}{{!}}frameless{{!}}200px{{!}}alt={{{caption|}}}]]</td></tr>}}
! colspan="2" style="background:#e8e8e8; font-size:120%; padding:0.4em;" | {{{name|{{PAGENAME}}}}}
<tr><th scope="row" style="width:40%; padding:0.3em; text-align:left;">Born</th><td style="padding:0.3em;">{{{birth_date|}}}{{#if:{{{birth_place|}}}|<br />{{{birth_place}}}}}</td></tr>
{{#if:{{{image|}}}|
<tr><th scope="row" style="padding:0.3em; text-align:left;">Died</th><td style="padding:0.3em;">{{{death_date|}}}{{#if:{{{death_place|}}}|<br />{{{death_place}}}}}</td></tr>
{{!}}-
{{#if:{{{resting_place|}}}|<tr><th scope="row" style="padding:0.3em; text-align:left;">Buried</th><td style="padding:0.3em;">{{{resting_place}}}</td></tr>}}
{{!}} colspan="2" style="text-align:center; padding:0.4em;" {{!}} [[File:{{{image}}}{{!}}frameless{{!}}200px{{!}}alt={{{caption|}}}]]}}
{{#if:{{{spouse|}}}|<tr><th scope="row" style="padding:0.3em; text-align:left;">Spouse(s)</th><td style="padding:0.3em;">{{{spouse}}}</td></tr>}}
{{#if:{{{birth_date|}}}{{{birth_place|}}}|
{{#if:{{{parents|}}}|<tr><th scope="row" style="padding:0.3em; text-align:left;">Parents</th><td style="padding:0.3em;">{{{parents}}}</td></tr>}}
{{!}}-
{{#if:{{{children|}}}|<tr><th scope="row" style="padding:0.3em; text-align:left;">Children</th><td style="padding:0.3em;">{{{children}}}</td></tr>}}
! scope="row" style="width:40%; padding:0.3em; text-align:left;" {{!}} Born
{{#if:{{{occupation|}}}|<tr><th scope="row" style="padding:0.3em; text-align:left;">Occupation</th><td style="padding:0.3em;">{{{occupation}}}</td></tr>}}
{{!}} style="padding:0.3em;" {{!}} {{{birth_date|}}}{{#if:{{{birth_place|}}}|<br />{{{birth_place}}}}}}}
{{#if:{{{known_for|}}}|<tr><th scope="row" style="padding:0.3em; text-align:left;">Known for</th><td style="padding:0.3em;">{{{known_for}}}</td></tr>}}
{{#if:{{{death_date|}}}{{{death_place|}}}|
</table></includeonly><noinclude>
{{!}}-
! scope="row" style="padding:0.3em; text-align:left;" {{!}} Died
{{!}} style="padding:0.3em;" {{!}} {{{death_date|}}}{{#if:{{{death_place|}}}|<br />{{{death_place}}}}}}}
{{#if:{{{resting_place|}}}|
{{!}}-
! scope="row" style="padding:0.3em; text-align:left;" {{!}} Buried
{{!}} style="padding:0.3em;" {{!}} {{{resting_place}}}}}
{{#if:{{{spouse|}}}|
{{!}}-
! scope="row" style="padding:0.3em; text-align:left;" {{!}} Spouse(s)
{{!}} 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>
== Usage ==
== Usage ==
Add to a person page (deceased individuals only):
<pre>
<pre>
{{Person
{{Person
| name       =
| name         =
| image       = Example.jpg
| image         = Example.jpg
| caption     =
| caption       =
| birth_date =
| birth_date   =
| birth_place =
| birth_place   =
| death_date =
| death_date   =
| death_place =
| 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.
All fields are optional and hidden when empty.


[[Category:Infobox templates]]
[[Category:Infobox templates]]
</noinclude>
</noinclude>

Latest revision as of 12:48, 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.