Jump to content

Template:Infobox character: Difference between revisions

From wiki58
No edit summary
 
Replace Fandom component markup with native Wikipedia classes; retain source parameters, content, and archived history
Line 1: Line 1:
<infobox>
{{#if:{{{name|}}}{{{image|}}}{{{aliases|}}}{{{relatives|}}}{{{affiliation|}}}{{{marital|}}}{{{birthDate|}}}{{{birthPlace|}}}{{{deathDate|}}}{{{deathPlace|}}}{{{species|}}}{{{gender|}}}{{{height|}}}{{{weight|}}}{{{eyes|}}}|<table class="infobox">
<title source="name"/>
{{#if:{{{name|}}}|<caption class="infobox-title">{{{name|}}}</caption>|}}
<image source="image">
{{#if:{{{image|}}}|<tr>
    <caption source="imagecaption" />
<td class="infobox-image" colspan="2">
</image>
{{#ifeq:{{#sub:{{{image|}}}|0|1}}|[|{{{image|}}}|[[{{#ifeq:{{lc:{{#sub:{{{image|}}}|0|5}}}}|file:||{{#ifeq:{{lc:{{#sub:{{{image|}}}|0|6}}}}|image:||File:}}}}{{{image|}}}|frameless|220px]]}}{{#if:{{{imagecaption|}}}|
<group>
<div class="infobox-caption">
    <data source="aliases"><label>Aliases</label></data>
{{{imagecaption|}}}
    <data source="relatives"><label>Relatives</label></data>
</div>|}}
    <data source="affiliation"><label>Affiliation</label></data>
</td>
    </group>
</tr>|}}
    <group>
{{#if:{{{aliases|}}}{{{relatives|}}}{{{affiliation|}}}|{{#if:{{{aliases|}}}|<tr>
        <header>Biographical information</header>
<th class="infobox-label" scope="row">
        <data source="marital"><label>Marital status</label></data>
Aliases
    <data source="birthDate"><label>Date of birth</label></data>
</th>
        <data source="birthPlace"><label>Place of birth</label></data>
<td class="infobox-data">
        <data source="deathDate"><label>Date of death</label></data>
{{{aliases|}}}
        <data source="deathPlace"><label>Place of death</label></data>
</td>
    </group>
</tr>|}}
    <group>
{{#if:{{{relatives|}}}|<tr>
        <header>Physical description</header>
<th class="infobox-label" scope="row">
        <data source="species"><label>Species</label></data>
Relatives
        <data source="gender"><label>Gender</label></data>
</th>
        <data source="height"><label>Height</label></data>
<td class="infobox-data">
        <data source="weight"><label>Weight</label></data>
{{{relatives|}}}
        <data source="eyes"><label>Eye color</label></data>
</td>
</group>
</tr>|}}
</infobox><includeonly>[[Category:Characters]]</includeonly><noinclude>{{Documentation}}</noinclude>
{{#if:{{{affiliation|}}}|<tr>
<th class="infobox-label" scope="row">
Affiliation
</th>
<td class="infobox-data">
{{{affiliation|}}}
</td>
</tr>|}}|}}
{{#if:{{{marital|}}}{{{birthDate|}}}{{{birthPlace|}}}{{{deathDate|}}}{{{deathPlace|}}}|<tr>
<th class="infobox-header" colspan="2">
Biographical information
</th>
</tr>
{{#if:{{{marital|}}}|<tr>
<th class="infobox-label" scope="row">
Marital status
</th>
<td class="infobox-data">
{{{marital|}}}
</td>
</tr>|}}
{{#if:{{{birthDate|}}}|<tr>
<th class="infobox-label" scope="row">
Date of birth
</th>
<td class="infobox-data">
{{{birthDate|}}}
</td>
</tr>|}}
{{#if:{{{birthPlace|}}}|<tr>
<th class="infobox-label" scope="row">
Place of birth
</th>
<td class="infobox-data">
{{{birthPlace|}}}
</td>
</tr>|}}
{{#if:{{{deathDate|}}}|<tr>
<th class="infobox-label" scope="row">
Date of death
</th>
<td class="infobox-data">
{{{deathDate|}}}
</td>
</tr>|}}
{{#if:{{{deathPlace|}}}|<tr>
<th class="infobox-label" scope="row">
Place of death
</th>
<td class="infobox-data">
{{{deathPlace|}}}
</td>
</tr>|}}|}}
{{#if:{{{species|}}}{{{gender|}}}{{{height|}}}{{{weight|}}}{{{eyes|}}}|<tr>
<th class="infobox-header" colspan="2">
Physical description
</th>
</tr>
{{#if:{{{species|}}}|<tr>
<th class="infobox-label" scope="row">
Species
</th>
<td class="infobox-data">
{{{species|}}}
</td>
</tr>|}}
{{#if:{{{gender|}}}|<tr>
<th class="infobox-label" scope="row">
Gender
</th>
<td class="infobox-data">
{{{gender|}}}
</td>
</tr>|}}
{{#if:{{{height|}}}|<tr>
<th class="infobox-label" scope="row">
Height
</th>
<td class="infobox-data">
{{{height|}}}
</td>
</tr>|}}
{{#if:{{{weight|}}}|<tr>
<th class="infobox-label" scope="row">
Weight
</th>
<td class="infobox-data">
{{{weight|}}}
</td>
</tr>|}}
{{#if:{{{eyes|}}}|<tr>
<th class="infobox-label" scope="row">
Eye color
</th>
<td class="infobox-data">
{{{eyes|}}}
</td>
</tr>|}}|}}
</table>|}}<includeonly>[[Category:Characters]]</includeonly><noinclude>
Native MediaWiki infobox using locally mirrored Wikipedia styles. Image fields accept a bare filename, a <code>File:</code>-prefixed name, or complete <code><nowiki>[[File:…]]</nowiki></code> markup. Fields, defaults, and categories retain the imported template API.
 
{{Documentation}}</noinclude>

Revision as of 17:59, 11 November 2026

Native MediaWiki infobox using locally mirrored Wikipedia styles. Image fields accept a bare filename, a File:-prefixed name, or complete [[File:…]] markup. Fields, defaults, and categories retain the imported template API.