Template:Infobox character: Difference between revisions
Appearance
Replace Fandom component markup with native Wikipedia classes; retain source parameters, content, and archived history |
m Remove generated paragraph spacing inside infobox cells; retain Wikipedia CSS |
||
| Line 2: | Line 2: | ||
{{#if:{{{name|}}}|<caption class="infobox-title">{{{name|}}}</caption>|}} | {{#if:{{{name|}}}|<caption class="infobox-title">{{{name|}}}</caption>|}} | ||
{{#if:{{{image|}}}|<tr> | {{#if:{{{image|}}}|<tr> | ||
<td class="infobox-image" colspan="2"> | <td class="infobox-image" colspan="2">{{#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|}}}|<div class="infobox-caption">{{{imagecaption|}}}</div>|}}</td> | ||
{{#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|}}}| | |||
<div class="infobox-caption"> | |||
{{{imagecaption|}}} | |||
</div>|}} | |||
</td> | |||
</tr>|}} | </tr>|}} | ||
{{#if:{{{aliases|}}}{{{relatives|}}}{{{affiliation|}}}|{{#if:{{{aliases|}}}|<tr> | {{#if:{{{aliases|}}}{{{relatives|}}}{{{affiliation|}}}|{{#if:{{{aliases|}}}|<tr> | ||
<th class="infobox-label" scope="row"> | <th class="infobox-label" scope="row">Aliases</th> | ||
Aliases | <td class="infobox-data">{{{aliases|}}}</td> | ||
</th> | |||
<td class="infobox-data"> | |||
{{{aliases|}}} | |||
</td> | |||
</tr>|}} | </tr>|}} | ||
{{#if:{{{relatives|}}}|<tr> | {{#if:{{{relatives|}}}|<tr> | ||
<th class="infobox-label" scope="row"> | <th class="infobox-label" scope="row">Relatives</th> | ||
Relatives | <td class="infobox-data">{{{relatives|}}}</td> | ||
</th> | |||
<td class="infobox-data"> | |||
{{{relatives|}}} | |||
</td> | |||
</tr>|}} | </tr>|}} | ||
{{#if:{{{affiliation|}}}|<tr> | {{#if:{{{affiliation|}}}|<tr> | ||
<th class="infobox-label" scope="row"> | <th class="infobox-label" scope="row">Affiliation</th> | ||
Affiliation | <td class="infobox-data">{{{affiliation|}}}</td> | ||
</th> | |||
<td class="infobox-data"> | |||
{{{affiliation|}}} | |||
</td> | |||
</tr>|}}|}} | </tr>|}}|}} | ||
{{#if:{{{marital|}}}{{{birthDate|}}}{{{birthPlace|}}}{{{deathDate|}}}{{{deathPlace|}}}|<tr> | {{#if:{{{marital|}}}{{{birthDate|}}}{{{birthPlace|}}}{{{deathDate|}}}{{{deathPlace|}}}|<tr> | ||
<th class="infobox-header" colspan="2"> | <th class="infobox-header" colspan="2">Biographical information</th> | ||
Biographical information | |||
</th> | |||
</tr> | </tr> | ||
{{#if:{{{marital|}}}|<tr> | {{#if:{{{marital|}}}|<tr> | ||
<th class="infobox-label" scope="row"> | <th class="infobox-label" scope="row">Marital status</th> | ||
Marital status | <td class="infobox-data">{{{marital|}}}</td> | ||
</th> | |||
<td class="infobox-data"> | |||
{{{marital|}}} | |||
</td> | |||
</tr>|}} | </tr>|}} | ||
{{#if:{{{birthDate|}}}|<tr> | {{#if:{{{birthDate|}}}|<tr> | ||
<th class="infobox-label" scope="row"> | <th class="infobox-label" scope="row">Date of birth</th> | ||
Date of birth | <td class="infobox-data">{{{birthDate|}}}</td> | ||
</th> | |||
<td class="infobox-data"> | |||
{{{birthDate|}}} | |||
</td> | |||
</tr>|}} | </tr>|}} | ||
{{#if:{{{birthPlace|}}}|<tr> | {{#if:{{{birthPlace|}}}|<tr> | ||
<th class="infobox-label" scope="row"> | <th class="infobox-label" scope="row">Place of birth</th> | ||
Place of birth | <td class="infobox-data">{{{birthPlace|}}}</td> | ||
</th> | |||
<td class="infobox-data"> | |||
{{{birthPlace|}}} | |||
</td> | |||
</tr>|}} | </tr>|}} | ||
{{#if:{{{deathDate|}}}|<tr> | {{#if:{{{deathDate|}}}|<tr> | ||
<th class="infobox-label" scope="row"> | <th class="infobox-label" scope="row">Date of death</th> | ||
Date of death | <td class="infobox-data">{{{deathDate|}}}</td> | ||
</th> | |||
<td class="infobox-data"> | |||
{{{deathDate|}}} | |||
</td> | |||
</tr>|}} | </tr>|}} | ||
{{#if:{{{deathPlace|}}}|<tr> | {{#if:{{{deathPlace|}}}|<tr> | ||
<th class="infobox-label" scope="row"> | <th class="infobox-label" scope="row">Place of death</th> | ||
Place of death | <td class="infobox-data">{{{deathPlace|}}}</td> | ||
</th> | |||
<td class="infobox-data"> | |||
{{{deathPlace|}}} | |||
</td> | |||
</tr>|}}|}} | </tr>|}}|}} | ||
{{#if:{{{species|}}}{{{gender|}}}{{{height|}}}{{{weight|}}}{{{eyes|}}}|<tr> | {{#if:{{{species|}}}{{{gender|}}}{{{height|}}}{{{weight|}}}{{{eyes|}}}|<tr> | ||
<th class="infobox-header" colspan="2"> | <th class="infobox-header" colspan="2">Physical description</th> | ||
Physical description | |||
</th> | |||
</tr> | </tr> | ||
{{#if:{{{species|}}}|<tr> | {{#if:{{{species|}}}|<tr> | ||
<th class="infobox-label" scope="row"> | <th class="infobox-label" scope="row">Species</th> | ||
Species | <td class="infobox-data">{{{species|}}}</td> | ||
</th> | |||
<td class="infobox-data"> | |||
{{{species|}}} | |||
</td> | |||
</tr>|}} | </tr>|}} | ||
{{#if:{{{gender|}}}|<tr> | {{#if:{{{gender|}}}|<tr> | ||
<th class="infobox-label" scope="row"> | <th class="infobox-label" scope="row">Gender</th> | ||
Gender | <td class="infobox-data">{{{gender|}}}</td> | ||
</th> | |||
<td class="infobox-data"> | |||
{{{gender|}}} | |||
</td> | |||
</tr>|}} | </tr>|}} | ||
{{#if:{{{height|}}}|<tr> | {{#if:{{{height|}}}|<tr> | ||
<th class="infobox-label" scope="row"> | <th class="infobox-label" scope="row">Height</th> | ||
Height | <td class="infobox-data">{{{height|}}}</td> | ||
</th> | |||
<td class="infobox-data"> | |||
{{{height|}}} | |||
</td> | |||
</tr>|}} | </tr>|}} | ||
{{#if:{{{weight|}}}|<tr> | {{#if:{{{weight|}}}|<tr> | ||
<th class="infobox-label" scope="row"> | <th class="infobox-label" scope="row">Weight</th> | ||
Weight | <td class="infobox-data">{{{weight|}}}</td> | ||
</th> | |||
<td class="infobox-data"> | |||
{{{weight|}}} | |||
</td> | |||
</tr>|}} | </tr>|}} | ||
{{#if:{{{eyes|}}}|<tr> | {{#if:{{{eyes|}}}|<tr> | ||
<th class="infobox-label" scope="row"> | <th class="infobox-label" scope="row">Eye color</th> | ||
Eye color | <td class="infobox-data">{{{eyes|}}}</td> | ||
</th> | |||
<td class="infobox-data"> | |||
{{{eyes|}}} | |||
</td> | |||
</tr>|}}|}} | </tr>|}}|}} | ||
</table>|}}<includeonly>[[Category:Characters]]</includeonly><noinclude> | </table>|}}<includeonly>[[Category:Characters]]</includeonly><noinclude> | ||
Latest revision as of 18:52, 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.
Template documentation
Note: portions of the template sample may not be visible without values provided.
View or edit this documentation. (About template documentation)
Editors can experiment in this template's sandbox and test case pages.
Description
To use this template, copy the following code and fill in the appropriate fields.
Syntax
{{infobox character
| name =
| image =
| imagecaption =
| aliases =
| affiliation =
| marital =
| birthDate =
| birthPlace =
| deathDate =
| deathPlace =
| species =
| gender =
| height =
| weight =
| eyes =
}}
Samples
![]() Flowa, at rest |
|
| Aliases | Flo |
|---|---|
| Biographical information | |
| Date of birth | July 21st, 2013 |
| Place of birth | Iowa |
| Physical description | |
| Species | Plant |
{{infobox character
| name = Flowa
| image = Example.jpg
| imagecaption = Flowa, at rest
| aliases = Flo
| affiliation =
| marital =
| birthDate = July 21st, 2013
| birthPlace = Iowa
| deathDate =
| deathPlace =
| species = Plant
| gender =
| height =
| weight =
| eyes =
}}
