Template:Infobox character: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<!-- Only render the box if at least one parameter has content --> | |||
{{#if:{{{name|}}}{{{image|}}}{{{caption|}}}{{{aliases|}}}{{{loyalties|}}}{{{title|}}}{{{role|}}}{{{birthplace|}}}{{{birthdate|}}}{{{status|}}}{{{species|}}}{{{gender|}}}{{{orientation|}}}{{{partners|}}}{{{education|}}}| | |||
<div style="border:1px solid #AAA; background-color:#F9F9F9; width:300px; padding:8px; font-size:90%; line-height:1.4em;"> | <div style="border:1px solid #AAA; background-color:#F9F9F9; width:300px; padding:8px; font-size:90%; line-height:1.4em;"> | ||
<!-- Name (centered | <!-- Name (centered, bold) --> | ||
<div style="text-align:center; font-size:120%; font-weight:bold; margin-bottom:6px;"> | {{#if:{{{name|}}}| | ||
<div style="text-align:center; font-size:120%; font-weight:bold; margin-bottom:6px;"> | |||
</div> | {{{name}}} | ||
</div> | |||
}} | |||
<!-- Image | <!-- Image + Caption --> | ||
<div style="text-align:center; margin-bottom:8px;"> | {{#if:{{{image|}}}| | ||
<div style="text-align:center; margin-bottom:8px;"> | |||
[[File:{{{image}}}|250px|center]] | |||
</div> | {{#if:{{{caption|}}}|<div style="font-size:85%; color:#555;">{{{caption}}}</div>}} | ||
</div> | |||
}} | |||
<!-- | <!-- Labeled data rows (only show rows that have values) --> | ||
<table style="width:100%; border-collapse:collapse; font-size:95%;"> | <table style="width:100%; border-collapse:collapse; font-size:95%;"> | ||
{{#if:{{{aliases|}}}|<tr><td style="vertical-align:top; width:35%; font-weight:bold;">Aliases</td><td>{{{aliases}}}</td></tr>}} | |||
{{#if:{{{loyalties|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Loyalties</td><td>{{{loyalties}}}</td></tr>}} | |||
{{#if:{{{title|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Title</td><td>{{{title}}}</td></tr>}} | |||
{{#if:{{{role|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Role</td><td>{{{role}}}</td></tr>}} | |||
{{#if:{{{birthplace|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Birthplace</td><td>{{{birthplace}}}</td></tr>}} | |||
{{#if:{{{birthdate|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Birthdate</td><td>{{{birthdate}}}</td></tr>}} | |||
{{#if:{{{status|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Status</td><td>{{{status}}}</td></tr>}} | |||
{{#if:{{{species|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Species</td><td>{{{species}}}</td></tr>}} | |||
{{#if:{{{gender|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Gender</td><td>{{{gender}}}</td></tr>}} | |||
{{#if:{{{orientation|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Orientation</td><td>{{{orientation}}}</td></tr>}} | |||
{{#if:{{{partners|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Partners</td><td>{{{partners}}}</td></tr>}} | |||
{{#if:{{{education|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Education</td><td>{{{education}}}</td></tr>}} | |||
</table> | </table> | ||
</div> | </div> | ||
}} | |||
</includeonly> | </includeonly> | ||
<noinclude> | <noinclude> | ||
{ | <templatedata> | ||
description | { | ||
params | "description": "Character infobox with centered name, image and caption below, and labeled fields in a two-column list. Empty fields are hidden automatically.", | ||
"params": { | |||
"name": { | |||
"label": "Name", | |||
"description": "Full name of the character.", | |||
"type": "string", | |||
"required": false, | |||
"example": "Valkaénnar Vaeari" | |||
}, | |||
"image": { | |||
"label": "Image", | |||
"description": "Image file name (omit the 'File:' prefix).", | |||
"type": "string", | |||
"required": false, | |||
"example": "Valkaennar.jpg" | |||
}, | |||
"caption": { | |||
"label": "Caption", | |||
"description": "Short caption or quote under the image.", | |||
"type": "string", | |||
"required": false, | |||
"example": "The Lord of Stillness." | |||
}, | |||
"aliases": { | |||
"label": "Aliases", | |||
"description": "Alternate names or titles the character is known by.", | |||
"type": "string", | |||
"required": false, | |||
"example": "Lucien Brumenoir; Klaus von Nibelheim" | |||
}, | |||
"loyalties": { | |||
"label": "Loyalties", | |||
"description": "Groups, houses, or causes the character serves.", | |||
"type": "string", | |||
"required": false, | |||
"example": "House Vaeari; Equinox" | |||
}, | |||
"title": { | |||
"label": "Title", | |||
"description": "Formal or informal title(s).", | |||
"type": "string", | |||
"required": false, | |||
"example": "Marquis; Graf" | |||
}, | |||
"role": { | |||
"label": "Role", | |||
"description": "Occupation, focus, or narrative role.", | |||
"type": "string", | |||
"required": false, | |||
"example": "Enchanter; Swordmage" | |||
}, | |||
"birthplace": { | |||
"label": "Birthplace", | |||
"description": "Place of birth or origin.", | |||
"type": "string", | |||
"required": false, | |||
"example": "Feywild" | |||
}, | |||
"birthdate": { | |||
"label": "Birthdate", | |||
"description": "Date of birth (any readable format).", | |||
"type": "string", | |||
"required": false, | |||
"example": "14 Summer 1492" | |||
}, | |||
"status": { | |||
"label": "Status", | |||
"description": "Current status (Alive, Deceased, Unknown, etc.).", | |||
"type": "string", | |||
"required": false, | |||
"example": "Alive" | |||
}, | |||
"species": { | |||
"label": "Species", | |||
"description": "Race or species.", | |||
"type": "string", | |||
"required": false, | |||
"example": "Ayldarzi" | |||
}, | |||
"gender": { | |||
"label": "Gender", | |||
"description": "Gender identity.", | |||
"type": "string", | |||
"required": false, | |||
"example": "Male" | |||
}, | |||
"orientation": { | |||
"label": "Orientation", | |||
"description": "Sexual orientation.", | |||
"type": "string", | |||
"required": false, | |||
"example": "Pansexual" | |||
}, | |||
"partners": { | |||
"label": "Partners", | |||
"description": "Romantic or bonded partners.", | |||
"type": "string", | |||
"required": false, | |||
"example": "Vael" | |||
}, | |||
"education": { | |||
"label": "Education", | |||
"description": "Training, schooling, or institutions.", | |||
"type": "string", | |||
"required": false, | |||
"example": "Arcane College of Ilina" | |||
} | |||
} | } | ||
} | } | ||
</templatedata> | |||
== Usage == | |||
=== Default (no data) === | |||
When you insert the template with no parameters, it renders nothing (so you don’t get an empty box): | |||
<pre> | |||
{{Infobox character}} | |||
</pre> | |||
=== Starter (blank fields ready to fill) === | |||
Paste and fill as needed: | |||
<pre> | |||
{{Infobox character | |||
| name = | |||
| image = | |||
| caption = | |||
| aliases = | |||
| loyalties = | |||
| title = | |||
| role = | |||
| birthplace = | |||
| birthdate = | |||
| status = | |||
| species = | |||
| gender = | |||
| orientation = | |||
| partners = | |||
| education = | |||
}} | }} | ||
</pre> | |||
== | === Example (filled) === | ||
<pre> | <pre> | ||
{{Infobox character | {{Infobox character | ||
| name = | | name = Valkaénnar Vaeari | ||
| image = | | image = Valkaennar.jpg | ||
| caption = | | caption = The Lord of Stillness. | ||
| aliases = | | aliases = Lucien Brumenoir; Klaus von Nibelheim | ||
| loyalties = | | loyalties = House Vaeari; Equinox | ||
| title = | | title = Marquis; Graf | ||
| role = | | role = Enchanter; Swordmage | ||
| birthplace = | | birthplace = Feywild | ||
| birthdate = | | birthdate = 14 Summer 1492 | ||
| status = | | status = Alive | ||
| species = | | species = Ayldarzi | ||
| gender = | | gender = Male | ||
| orientation = | | orientation = Pansexual | ||
| partners = | | partners = Vael | ||
| education = | | education = Arcane College of Ilina | ||
}} | }} | ||
</pre> | </pre> | ||
</noinclude> | </noinclude> | ||
Revision as of 13:17, 30 October 2025
Character infobox with centered name, image and caption below, and labeled fields in a two-column list. Empty fields are hidden automatically.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Name | name | Full name of the character.
| String | optional |
| Image | image | Image file name (omit the 'File:' prefix).
| String | optional |
| Caption | caption | Short caption or quote under the image.
| String | optional |
| Aliases | aliases | Alternate names or titles the character is known by.
| String | optional |
| Loyalties | loyalties | Groups, houses, or causes the character serves.
| String | optional |
| Title | title | Formal or informal title(s).
| String | optional |
| Role | role | Occupation, focus, or narrative role.
| String | optional |
| Birthplace | birthplace | Place of birth or origin.
| String | optional |
| Birthdate | birthdate | Date of birth (any readable format).
| String | optional |
| Status | status | Current status (Alive, Deceased, Unknown, etc.).
| String | optional |
| Species | species | Race or species.
| String | optional |
| Gender | gender | Gender identity.
| String | optional |
| Orientation | orientation | Sexual orientation.
| String | optional |
| Partners | partners | Romantic or bonded partners.
| String | optional |
| Education | education | Training, schooling, or institutions.
| String | optional |
Usage
Default (no data)
When you insert the template with no parameters, it renders nothing (so you don’t get an empty box):
{{Infobox character}}
Starter (blank fields ready to fill)
Paste and fill as needed:
{{Infobox character
| name =
| image =
| caption =
| aliases =
| loyalties =
| title =
| role =
| birthplace =
| birthdate =
| status =
| species =
| gender =
| orientation =
| partners =
| education =
}}
Example (filled)
{{Infobox character
| name = Valkaénnar Vaeari
| image = Valkaennar.jpg
| caption = The Lord of Stillness.
| aliases = Lucien Brumenoir; Klaus von Nibelheim
| loyalties = House Vaeari; Equinox
| title = Marquis; Graf
| role = Enchanter; Swordmage
| birthplace = Feywild
| birthdate = 14 Summer 1492
| status = Alive
| species = Ayldarzi
| gender = Male
| orientation = Pansexual
| partners = Vael
| education = Arcane College of Ilina
}}