Template:Infobox person: Difference between revisions

no edit summary
(Created page with "<!-- ============== Infobox person (ParserFunctions version) ============== --> {| class="infobox vcard" |- ! class="infobox-header" colspan="2" | {{{name|{{PAGENAME}}}}} <!-- Image (optional) --> {{#if:{{{image|}}}| |- | class="infobox-image" colspan="2" | [[File:{{{image}}}|{{#if:{{{image_size|}}}|{{{image_size}}}|250px}}|center]] {{#if:{{{caption|}}}|<div class="infobox-caption">{{{caption}}}</div>}} }} <!-- Identity --> {{#if:{{{native_name|}}}| |- ! scope="row" |...")
 
No edit summary
 
Line 1: Line 1:
<!-- ============== Infobox person (ParserFunctions version) ============== -->
<includeonly><table class="infobox biography vcard" style="width:22em">
{| class="infobox vcard"
{{#if:{{{name|}}}|
|-
<caption class="infobox-title fn">{{{name}}}</caption>
! class="infobox-header" colspan="2" | {{{name|{{PAGENAME}}}}}
|
 
<caption class="infobox-title fn">{{PAGENAME}}</caption>
<!-- Image (optional) -->
}}
{{#if:{{{image|}}}|
{{#if:{{{image|}}}|
|-
<tr>
| class="infobox-image" colspan="2" | [[File:{{{image}}}|{{#if:{{{image_size|}}}|{{{image_size}}}|250px}}|center]]
<td colspan="2" class="infobox-image">
[[File:{{{image}}}|{{#if:{{{image_size|}}}|{{{image_size}}}|250px}}|alt={{{alt|{{{name|{{PAGENAME}}}}}}}}]]
{{#if:{{{caption|}}}|<div class="infobox-caption">{{{caption}}}</div>}}
{{#if:{{{caption|}}}|<div class="infobox-caption">{{{caption}}}</div>}}
}}
</td>
 
</tr>
<!-- Identity -->
{{#if:{{{native_name|}}}|
|-
! scope="row" | Native name
| {{{native_name}}}
}}
}}
{{#if:{{{birth_name|}}}|
{{#if:{{{birth_name|}}}|
|-
<tr>
! scope="row" | Birth name
<th scope="row" class="infobox-label">Born</th>
| {{{birth_name}}}
<td class="infobox-data">
<div class="nickname">{{{birth_name}}}</div>
{{#if:{{{birth_date|}}}|{{{birth_date}}}{{#if:{{{birth_place|}}}|<br/>{{{birth_place}}}}}|{{#if:{{{birth_place|}}}|{{{birth_place}}}}}}}
</td>
</tr>
|{{#if:{{{birth_date|{{{birth_place|}}}}}}|
<tr>
<th scope="row" class="infobox-label">Born</th>
<td class="infobox-data">
{{#if:{{{birth_date|}}}|{{{birth_date}}}{{#if:{{{birth_place|}}}|<br/>{{{birth_place}}}}}|{{{birth_place}}}}}
</td>
</tr>
}}}}
{{#if:{{{death_date|{{{death_place|}}}}}}|
<tr>
<th scope="row" class="infobox-label">Died</th>
<td class="infobox-data">
{{#if:{{{death_date|}}}|{{{death_date}}}{{#if:{{{death_place|}}}|<br/>{{{death_place}}}}}|{{{death_place}}}}}
</td>
</tr>
}}
}}
 
{{#if:{{{death_cause|}}}|
<!-- Birth / Death -->
<tr>
{{#if:{{{birth_date|}}}|
<th scope="row" class="infobox-label">Cause of death</th>
|-
<td class="infobox-data">{{{death_cause}}}</td>
! scope="row" class="nowrap" | Born
</tr>
| {{{birth_date}}}{{#if:{{{birth_place|}}}|, {{{birth_place}}}}}
}}
}}
{{#if:{{{death_date|}}}|
{{#if:{{{resting_place|}}}|
|-
<tr>
! scope="row" class="nowrap" | Died
<th scope="row" class="infobox-label">Resting place</th>
| {{{death_date}}}{{#if:{{{death_place|}}}|, {{{death_place}}}}}
<td class="infobox-data">{{{resting_place}}}</td>
</tr>
}}
}}
 
{{#if:{{{other_names|}}}|
<!-- Nationality / Citizenship -->
<tr>
{{#if:{{{nationality|}}}|
<th scope="row" class="infobox-label">Other names</th>
|-
<td class="infobox-data">{{{other_names}}}</td>
! scope="row" | Nationality
</tr>
| {{{nationality}}}
}}
}}
{{#if:{{{citizenship|}}}|
{{#if:{{{citizenship|}}}|
|-
<tr>
! scope="row" | Citizenship
<th scope="row" class="infobox-label">Citizenship</th>
| {{{citizenship}}}
<td class="infobox-data">{{{citizenship}}}</td>
</tr>
}}
{{#if:{{{nationality|}}}|
<tr>
<th scope="row" class="infobox-label">Nationality</th>
<td class="infobox-data">{{{nationality}}}</td>
</tr>
}}
}}
<!-- Education -->
{{#if:{{{education|}}}|
{{#if:{{{education|}}}|
|-
<tr>
! scope="row" | Education
<th scope="row" class="infobox-label">Education</th>
| {{{education}}}
<td class="infobox-data">{{{education}}}</td>
</tr>
}}
}}
{{#if:{{{alma_mater|}}}|
{{#if:{{{alma_mater|}}}|
|-
<tr>
! scope="row" | Alma mater
<th scope="row" class="infobox-label">Alma mater</th>
| {{{alma_mater}}}
<td class="infobox-data">{{{alma_mater}}}</td>
</tr>
}}
}}
<!-- Career -->
{{#if:{{{occupation|}}}|
{{#if:{{{occupation|}}}|
|-
<tr>
! scope="row" | Occupation
<th scope="row" class="infobox-label">Occupation</th>
| {{{occupation}}}
<td class="infobox-data">{{{occupation}}}</td>
</tr>
}}
}}
{{#if:{{{years_active|}}}|
{{#if:{{{years_active|}}}|
|-
<tr>
! scope="row" | Years active
<th scope="row" class="infobox-label">Years active</th>
| {{{years_active}}}
<td class="infobox-data">{{{years_active}}}</td>
</tr>
}}
}}
{{#if:{{{employer|}}}|
{{#if:{{{employer|}}}|
|-
<tr>
! scope="row" | Employer
<th scope="row" class="infobox-label">Employer</th>
| {{{employer}}}
<td class="infobox-data">{{{employer}}}</td>
</tr>
}}
}}
{{#if:{{{organization|}}}|
{{#if:{{{organization|}}}|
|-
<tr>
! scope="row" | Organization
<th scope="row" class="infobox-label">Organization</th>
| {{{organization}}}
<td class="infobox-data">{{{organization}}}</td>
}}
</tr>
{{#if:{{{title|}}}|
|-
! scope="row" | Title
| {{{title}}}
}}
}}
<!-- Notability -->
{{#if:{{{known_for|}}}|
{{#if:{{{known_for|}}}|
|-
<tr>
! scope="row" | Known for
<th scope="row" class="infobox-label">Known for</th>
| {{{known_for}}}
<td class="infobox-data">{{{known_for}}}</td>
</tr>
}}
}}
{{#if:{{{notable_works|}}}|
{{#if:{{{notable_works|}}}|
|-
<tr>
! scope="row" | Notable works
<th scope="row" class="infobox-label">Notable work</th>
| {{{notable_works}}}
<td class="infobox-data">{{{notable_works}}}</td>
</tr>
}}
{{#if:{{{style|}}}|
<tr>
<th scope="row" class="infobox-label">Style</th>
<td class="infobox-data">{{{style}}}</td>
</tr>
}}
}}
{{#if:{{{awards|}}}|
{{#if:{{{movement|}}}|
|-
<tr>
! scope="row" | Awards
<th scope="row" class="infobox-label">Movement</th>
| {{{awards}}}
<td class="infobox-data">{{{movement}}}</td>
</tr>
}}
}}
<!-- Family -->
{{#if:{{{spouse|}}}|
{{#if:{{{spouse|}}}|
|-
<tr>
! scope="row" | Spouse(s)
<th scope="row" class="infobox-label">Spouse{{#if:{{{spouses|}}}|s}}</th>
| {{{spouse}}}
<td class="infobox-data">{{#if:{{{spouses|}}}|{{{spouses}}}|{{{spouse}}}}}</td>
</tr>
}}
}}
{{#if:{{{partner|}}}|
{{#if:{{{partner|}}}|
|-
<tr>
! scope="row" | Partner(s)
<th scope="row" class="infobox-label">Partner{{#if:{{{partners|}}}|s}}</th>
| {{{partner}}}
<td class="infobox-data">{{#if:{{{partners|}}}|{{{partners}}}|{{{partner}}}}}</td>
</tr>
}}
}}
{{#if:{{{children|}}}|
{{#if:{{{children|}}}|
|-
<tr>
! scope="row" | Children
<th scope="row" class="infobox-label">Children</th>
| {{{children}}}
<td class="infobox-data">{{{children}}}</td>
</tr>
}}
}}
{{#if:{{{parents|}}}|
{{#if:{{{parents|}}}|
|-
<tr>
! scope="row" | Parents
<th scope="row" class="infobox-label">Parent{{#if:{{{parent|}}}||s}}</th>
| {{{parents}}}
<td class="infobox-data">{{#if:{{{parent|}}}|{{{parent}}}|{{{parents}}}}}</td>
</tr>
}}
}}
{{#if:{{{relatives|}}}|
{{#if:{{{relatives|}}}|
|-
<tr>
! scope="row" | Relatives
<th scope="row" class="infobox-label">Relatives</th>
| {{{relatives}}}
<td class="infobox-data">{{{relatives}}}</td>
</tr>
}}
}}
{{#if:{{{awards|}}}|
<tr>
<th scope="row" class="infobox-label">Awards</th>
<td class="infobox-data">{{{awards}}}</td>
</tr>
}}
{{#if:{{{honours|}}}|
<tr>
<th scope="row" class="infobox-label">Honours</th>
<td class="infobox-data">{{{honours}}}</td>
</tr>
}}
{{#if:{{{website|}}}|
<tr>
<th scope="row" class="infobox-label">Website</th>
<td class="infobox-data">{{{website}}}</td>
</tr>
}}
{{#if:{{{signature|}}}|
<tr>
<td colspan="2" class="infobox-below">
'''Signature'''<br/>
[[File:{{{signature}}}|128px|alt=Signature|{{{signature_alt|Signature}}}]]
</td>
</tr>
}}
</table></includeonly><noinclude>
[[Category:Infobox templates]]
[[Category:People templates]]
== Description ==
This template creates a standardized infobox for biographical articles about people, following modern Wikipedia layout standards.


<!-- Web -->
== Usage ==
{{#if:{{{website|}}}|
Copy the following code to the top of a person's page:
|-
<pre>
! scope="row" | Website
{{Infobox person
| [{{{website}}} {{#if:{{{website_label|}}}|{{{website_label}}}|Official website}}]
|name =
|image =
|image_size =
|caption =
|alt =
|birth_name =
|birth_date =
|birth_place =
|death_date =
|death_place =
|death_cause =
|resting_place =
|other_names =
|citizenship =
|nationality =
|education =
|alma_mater =
|occupation =
|years_active =
|employer =
|organization =
|known_for =
|notable_works =
|style =
|movement =
|spouse =
|spouses =
|partner =
|partners =  
|children =
|parent =
|parents =
|relatives =
|awards =
|honours =
|website =
|signature =
|signature_alt =
}}
}}
</pre>


|}
== Parameters ==


<!-- ================= TemplateData for VisualEditor ================= -->
=== Basic information ===
<templatedata>
* '''name''' - The person's full name (if not provided, defaults to the page name)
{
* '''image''' - Filename of an image (without the File: prefix)
  "description": "Simple, Wikipedia-style Infobox for people. Hides empty fields automatically.",
* '''image_size''' - Size of the image (defaults to 250px if not specified)
  "params": {
* '''caption''' - Caption text for the image
    "name": { "label": "Name", "type": "string", "suggested": true },
* '''alt''' - Alternative text for the image (for accessibility)
    "image": { "label": "Image filename (without File:)", "type": "string", "example": "Jane_Doe.jpg" },
    "image_size": { "label": "Image size", "type": "string", "example": "250px" },
    "caption": { "label": "Image caption", "type": "string" },


    "native_name": { "label": "Native name", "type": "string" },
=== Birth and death ===
    "birth_name": { "label": "Birth name", "type": "string" },
* '''birth_name''' - Birth name if different from current name
* '''birth_date''' - Date of birth (recommended format: {{birth date|YYYY|MM|DD}})
* '''birth_place''' - Place of birth
* '''death_date''' - Date of death (recommended format: {{death date|YYYY|MM|DD}})
* '''death_place''' - Place of death
* '''death_cause''' - Cause of death
* '''resting_place''' - Final resting place


    "birth_date": { "label": "Birth date", "type": "string", "example": "1 January 1990" },
=== Identity ===
    "birth_place": { "label": "Birth place", "type": "string" },
* '''other_names''' - Alternative names, nicknames, or pen names
    "death_date": { "label": "Death date", "type": "string" },
* '''citizenship''' - Country of citizenship
    "death_place": { "label": "Death place", "type": "string" },
* '''nationality''' - Nationality or ethnicity


    "nationality": { "label": "Nationality", "type": "string" },
=== Education and career ===
    "citizenship": { "label": "Citizenship", "type": "string" },
* '''education''' - Education level or degrees earned
* '''alma_mater''' - College or university attended
* '''occupation''' - Primary occupation or profession
* '''years_active''' - Active years in their profession
* '''employer''' - Current or notable employer
* '''organization''' - Associated organizations


    "education": { "label": "Education", "type": "string" },
=== Achievements ===
    "alma_mater": { "label": "Alma mater", "type": "string" },
* '''known_for''' - Major achievements or contributions
* '''notable_works''' - Important works or projects
* '''style''' - Artistic or professional style
* '''movement''' - Associated movements or schools of thought
* '''awards''' - Significant awards received
* '''honours''' - Honours and recognitions


    "occupation": { "label": "Occupation", "type": "string", "suggested": true },
=== Personal life ===
    "years_active": { "label": "Years active", "type": "string" },
* '''spouse''' - Name of spouse (use for single spouse)
    "employer": { "label": "Employer", "type": "string" },
* '''spouses''' - Names of spouses (use for multiple spouses)
    "organization": { "label": "Organization", "type": "string" },
* '''partner''' - Name of partner (use for single partner)
    "title": { "label": "Title", "type": "string" },
* '''partners''' - Names of partners (use for multiple partners)
* '''children''' - Number or names of children
* '''parent''' - Name of parent (use for single parent)
* '''parents''' - Names of parents (use for both parents)
* '''relatives''' - Notable relatives


    "known_for": { "label": "Known for", "type": "string" },
=== Other ===
    "notable_works": { "label": "Notable works", "type": "string" },
* '''website''' - Official website URL
    "awards": { "label": "Awards", "type": "string" },
* '''signature''' - Filename of signature image
* '''signature_alt''' - Alternative text for signature


    "spouse": { "label": "Spouse(s)", "type": "string" },
== Example ==
    "partner": { "label": "Partner(s)", "type": "string" },
{{Infobox person
    "children": { "label": "Children", "type": "string" },
|name = John Smith
    "parents": { "label": "Parents", "type": "string" },
|image = John_Smith.jpg
    "relatives": { "label": "Relatives", "type": "string" },
|image_size = 250px
|caption = John Smith in 2023
|birth_date = {{birth date|1970|1|1}}
|birth_place = [[London]], [[England]]
|occupation = Author, Professor
|nationality = British
|alma_mater = [[Oxford University]]
|known_for = Writing about examples
|years_active = 1990–present
|spouse = Jane Smith
|children = 2
|website = {{URL|https://example.com}}
}}


    "website": { "label": "Website (full URL incl. https://)", "type": "string" },
<templatedata>
    "website_label": { "label": "Website label (optional)", "type": "string", "default": "Official website" }
{
  },
  "description": "Template for creating standardized infoboxes for biographical articles about people, following modern Wikipedia layout standards",
  "sets": [
  "format": "block",
    {
  "params": {
       "label": "Identity",
    "name": {
       "params": ["name", "image", "image_size", "caption", "native_name", "birth_name"]
       "label": "Name",
       "description": "The person's full name (defaults to page name if not specified)",
      "type": "string",
      "suggested": true
     },
     },
     {
     "image": {
       "label": "Birth & death",
       "label": "Image",
       "params": ["birth_date", "birth_place", "death_date", "death_place"]
       "description": "Filename of an image (without the File: prefix)",
      "type": "wiki-file-name"
     },
     },
     {
     "image_size": {
      "label": "Image size",
      "description": "Width of the image",
      "type": "string",
      "default": "250px"
    },
    "caption": {
      "label": "Caption",
      "description": "Caption text for the image",
      "type": "string"
    },
    "alt": {
      "label": "Alt text",
      "description": "Alternative text for the image (for accessibility)",
      "type": "string"
    },
    "birth_name": {
      "label": "Birth name",
      "description": "Birth name if different from current name",
      "type": "string"
    },
    "birth_date": {
      "label": "Birth date",
      "description": "Date of birth",
      "type": "date"
    },
    "birth_place": {
      "label": "Birth place",
      "description": "Place of birth",
      "type": "string"
    },
    "death_date": {
      "label": "Death date",
      "description": "Date of death",
      "type": "date"
    },
    "death_place": {
      "label": "Death place",
      "description": "Place of death",
      "type": "string"
    },
    "death_cause": {
      "label": "Cause of death",
      "description": "Cause of death",
      "type": "string"
    },
    "resting_place": {
      "label": "Resting place",
      "description": "Final resting place",
      "type": "string"
    },
    "other_names": {
      "label": "Other names",
      "description": "Alternative names, nicknames, or pen names",
      "type": "string"
    },
    "citizenship": {
      "label": "Citizenship",
      "description": "Country of citizenship",
      "type": "string"
    },
    "nationality": {
       "label": "Nationality",
       "label": "Nationality",
       "params": ["nationality", "citizenship"]
       "description": "Nationality or ethnicity",
      "type": "string"
     },
     },
     {
     "education": {
       "label": "Education",
       "label": "Education",
       "params": ["education", "alma_mater"]
       "description": "Education level or degrees earned",
      "type": "string"
    },
    "alma_mater": {
      "label": "Alma mater",
      "description": "College or university attended",
      "type": "string"
    },
    "occupation": {
      "label": "Occupation",
      "description": "Primary occupation or profession",
      "type": "string"
    },
    "years_active": {
      "label": "Years active",
      "description": "Active years in their profession",
      "type": "string"
    },
    "employer": {
      "label": "Employer",
      "description": "Current or notable employer",
      "type": "string"
    },
    "organization": {
      "label": "Organization",
      "description": "Associated organizations",
      "type": "string"
    },
    "known_for": {
      "label": "Known for",
      "description": "Major achievements or contributions",
      "type": "string"
    },
    "notable_works": {
      "label": "Notable works",
      "description": "Important works or projects",
      "type": "string"
    },
    "style": {
      "label": "Style",
      "description": "Artistic or professional style",
      "type": "string"
    },
    "movement": {
      "label": "Movement",
      "description": "Associated movements or schools of thought",
      "type": "string"
    },
    "spouse": {
      "label": "Spouse",
      "description": "Name of spouse (for single spouse)",
      "type": "string"
    },
    "spouses": {
      "label": "Spouses",
      "description": "Names of spouses (for multiple spouses)",
      "type": "string"
    },
    "partner": {
      "label": "Partner",
      "description": "Name of partner (for single partner)",
      "type": "string"
    },
    "partners": {
      "label": "Partners",
      "description": "Names of partners (for multiple partners)",
      "type": "string"
    },
    "children": {
      "label": "Children",
      "description": "Number or names of children",
      "type": "string"
    },
    "parent": {
      "label": "Parent",
      "description": "Name of parent (for single parent)",
      "type": "string"
    },
    "parents": {
      "label": "Parents",
      "description": "Names of parents",
      "type": "string"
    },
    "relatives": {
      "label": "Relatives",
      "description": "Notable relatives",
      "type": "string"
    },
    "awards": {
      "label": "Awards",
      "description": "Significant awards received",
      "type": "string"
     },
     },
     {
     "honours": {
       "label": "Career",
       "label": "Honours",
       "params": ["occupation", "years_active", "employer", "organization", "title"]
       "description": "Honours and recognitions",
      "type": "string"
     },
     },
     {
     "website": {
       "label": "Notability",
       "label": "Website",
       "params": ["known_for", "notable_works", "awards"]
       "description": "Official website URL",
      "type": "url"
     },
     },
     {
     "signature": {
       "label": "Family",
       "label": "Signature",
       "params": ["spouse", "partner", "children", "parents", "relatives"]
       "description": "Filename of signature image",
      "type": "wiki-file-name"
     },
     },
     {
     "signature_alt": {
       "label": "Web",
       "label": "Signature alt text",
       "params": ["website", "website_label"]
       "description": "Alternative text for signature",
      "type": "string"
     }
     }
   ]
   }
}
}
</templatedata>
</templatedata>
</noinclude>