Template:Infobox character: Difference between revisions

From feywild

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 and bold) -->
  <!-- Name (centered, bold) -->
<div style="text-align:center; font-size:120%; font-weight:bold; margin-bottom:6px;">
  {{#if:{{{name|}}}|
  {{{name|Unknown}}}
  <div style="text-align:center; font-size:120%; font-weight:bold; margin-bottom:6px;">
</div>
    {{{name}}}
  </div>
  }}


<!-- Image and Caption -->
  <!-- Image + Caption -->
<div style="text-align:center; margin-bottom:8px;">
  {{#if:{{{image|}}}|
  {{#if:{{{image|}}}|[[File:{{{image}}}|250px|center]]}}
  <div style="text-align:center; margin-bottom:8px;">
  <div style="font-size:85%; color:#555;">{{{caption|}}}</div>
    [[File:{{{image}}}|250px|center]]
</div>
    {{#if:{{{caption|}}}|<div style="font-size:85%; color:#555;">{{{caption}}}</div>}}
  </div>
  }}


<!-- Data Fields -->
  <!-- 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%;">
  <tr><td style="vertical-align:top; width:35%; font-weight:bold;">Aliases</td><td>{{{aliases|}}}</td></tr>
    {{#if:{{{aliases|}}}|<tr><td style="vertical-align:top; width:35%; font-weight:bold;">Aliases</td><td>{{{aliases}}}</td></tr>}}
  <tr><td style="vertical-align:top; font-weight:bold;">Loyalties</td><td>{{{loyalties|}}}</td></tr>
    {{#if:{{{loyalties|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Loyalties</td><td>{{{loyalties}}}</td></tr>}}
  <tr><td style="vertical-align:top; font-weight:bold;">Title</td><td>{{{title|}}}</td></tr>
    {{#if:{{{title|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Title</td><td>{{{title}}}</td></tr>}}
  <tr><td style="vertical-align:top; font-weight:bold;">Role</td><td>{{{role|}}}</td></tr>
    {{#if:{{{role|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Role</td><td>{{{role}}}</td></tr>}}
  <tr><td style="vertical-align:top; font-weight:bold;">Birthplace</td><td>{{{birthplace|}}}</td></tr>
    {{#if:{{{birthplace|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Birthplace</td><td>{{{birthplace}}}</td></tr>}}
  <tr><td style="vertical-align:top; font-weight:bold;">Birthdate</td><td>{{{birthdate|}}}</td></tr>
    {{#if:{{{birthdate|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Birthdate</td><td>{{{birthdate}}}</td></tr>}}
  <tr><td style="vertical-align:top; font-weight:bold;">Status</td><td>{{{status|}}}</td></tr>
    {{#if:{{{status|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Status</td><td>{{{status}}}</td></tr>}}
  <tr><td style="vertical-align:top; font-weight:bold;">Species</td><td>{{{species|}}}</td></tr>
    {{#if:{{{species|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Species</td><td>{{{species}}}</td></tr>}}
  <tr><td style="vertical-align:top; font-weight:bold;">Gender</td><td>{{{gender|}}}</td></tr>
    {{#if:{{{gender|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Gender</td><td>{{{gender}}}</td></tr>}}
  <tr><td style="vertical-align:top; font-weight:bold;">Orientation</td><td>{{{orientation|}}}</td></tr>
    {{#if:{{{orientation|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Orientation</td><td>{{{orientation}}}</td></tr>}}
  <tr><td style="vertical-align:top; font-weight:bold;">Partners</td><td>{{{partners|}}}</td></tr>
    {{#if:{{{partners|}}}|<tr><td style="vertical-align:top; font-weight:bold;">Partners</td><td>{{{partners}}}</td></tr>}}
  <tr><td style="vertical-align:top; font-weight:bold;">Education</td><td>{{{education|}}}</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|
<templatedata>
description = "Displays a neatly formatted infobox for characters, with name centered, image and caption below, and remaining data fields listed with labels."
{
params = {
  "description": "Character infobox with centered name, image and caption below, and labeled fields in a two-column list. Empty fields are hidden automatically.",
  name = {
  "params": {
    label = "Name",
    "name": {
    description = "Full name of the character.",
      "label": "Name",
    type = "string",
      "description": "Full name of the character.",
    required = true
      "type": "string",
  },
      "required": false,
  image = {
      "example": "Valkaénnar Vaeari"
    label = "Image",
    },
    description = "Image file name (omit File: prefix).",
    "image": {
    type = "string",
      "label": "Image",
    required = false
      "description": "Image file name (omit the 'File:' prefix).",
  },
      "type": "string",
  caption = {
      "required": false,
    label = "Caption",
      "example": "Valkaennar.jpg"
    description = "Short caption or quote under the image.",
    },
    type = "string",
    "caption": {
    required = false
      "label": "Caption",
  },
      "description": "Short caption or quote under the image.",
  aliases = {
      "type": "string",
    label = "Aliases",
      "required": false,
    description = "Alternate names or titles the character is known by.",
      "example": "The Lord of Stillness."
    type = "string",
    },
    required = false
    "aliases": {
  },
      "label": "Aliases",
  loyalties = {
      "description": "Alternate names or titles the character is known by.",
    label = "Loyalties",
      "type": "string",
    description = "Organizations, families, or causes the character is loyal to.",
      "required": false,
    type = "string",
      "example": "Lucien Brumenoir; Klaus von Nibelheim"
    required = false
    },
  },
    "loyalties": {
  title = {
      "label": "Loyalties",
    label = "Title",
      "description": "Groups, houses, or causes the character serves.",
    description = "Formal or informal title(s).",
      "type": "string",
    type = "string",
      "required": false,
    required = false
      "example": "House Vaeari; Equinox"
  },
    },
  role = {
    "title": {
    label = "Role",
      "label": "Title",
    description = "Occupation, profession, or narrative role.",
      "description": "Formal or informal title(s).",
    type = "string",
      "type": "string",
    required = false
      "required": false,
  },
      "example": "Marquis; Graf"
  birthplace = {
    },
    label = "Birthplace",
    "role": {
    description = "Place of birth or origin.",
      "label": "Role",
    type = "string",
      "description": "Occupation, focus, or narrative role.",
    required = false
      "type": "string",
  },
      "required": false,
  birthdate = {
      "example": "Enchanter; Swordmage"
    label = "Birthdate",
    },
    description = "Character's date of birth.",
    "birthplace": {
    type = "string",
      "label": "Birthplace",
    required = false
      "description": "Place of birth or origin.",
  },
      "type": "string",
  status = {
      "required": false,
    label = "Status",
      "example": "Feywild"
    description = "Current status (Alive, Deceased, Unknown, etc.).",
    },
    type = "string",
    "birthdate": {
    required = false
      "label": "Birthdate",
  },
      "description": "Date of birth (any readable format).",
  species = {
      "type": "string",
    label = "Species",
      "required": false,
    description = "Race or species of the character.",
      "example": "14 Summer 1492"
    type = "string",
    },
    required = false
    "status": {
  },
      "label": "Status",
  gender = {
      "description": "Current status (Alive, Deceased, Unknown, etc.).",
    label = "Gender",
      "type": "string",
    description = "Gender identity of the character.",
      "required": false,
    type = "string",
      "example": "Alive"
    required = false
    },
  },
    "species": {
  orientation = {
      "label": "Species",
    label = "Orientation",
      "description": "Race or species.",
    description = "Sexual orientation.",
      "type": "string",
    type = "string",
      "required": false,
    required = false
      "example": "Ayldarzi"
  },
    },
  partners = {
    "gender": {
    label = "Partners",
      "label": "Gender",
    description = "Romantic or bonded partners.",
      "description": "Gender identity.",
    type = "string",
      "type": "string",
    required = false
      "required": false,
  },
      "example": "Male"
  education = {
    },
    label = "Education",
    "orientation": {
    description = "Training, schooling, or institutions attended.",
      "label": "Orientation",
    type = "string",
      "description": "Sexual orientation.",
    required = false
      "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>


== Usage ==
=== Example (filled) ===
Place this template at the top of a character page:
<pre>
<pre>
{{Infobox character
{{Infobox character
| name        = Example Name
| name        = Valkaénnar Vaeari
| image      = Example.jpg
| image      = Valkaennar.jpg
| caption    = Example Caption
| caption    = The Lord of Stillness.
| aliases    = add alias
| aliases    = Lucien Brumenoir; Klaus von Nibelheim
| loyalties  = factions etc
| loyalties  = House Vaeari; Equinox
| title      = whatever titles
| title      = Marquis; Graf
| role        = class, profession etc
| role        = Enchanter; Swordmage
| birthplace  = where
| birthplace  = Feywild
| birthdate  = when
| birthdate  = 14 Summer 1492
| status      = alive
| status      = Alive
| species    = species, race, nationality
| species    = Ayldarzi
| gender      = whatever
| gender      = Male
| orientation = whatever
| orientation = Pansexual
| partners    = whoever
| partners    = Vael
| education  = whatever
| 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.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Namename

Full name of the character.

Example
Valkaénnar Vaeari
Stringoptional
Imageimage

Image file name (omit the 'File:' prefix).

Example
Valkaennar.jpg
Stringoptional
Captioncaption

Short caption or quote under the image.

Example
The Lord of Stillness.
Stringoptional
Aliasesaliases

Alternate names or titles the character is known by.

Example
Lucien Brumenoir; Klaus von Nibelheim
Stringoptional
Loyaltiesloyalties

Groups, houses, or causes the character serves.

Example
House Vaeari; Equinox
Stringoptional
Titletitle

Formal or informal title(s).

Example
Marquis; Graf
Stringoptional
Rolerole

Occupation, focus, or narrative role.

Example
Enchanter; Swordmage
Stringoptional
Birthplacebirthplace

Place of birth or origin.

Example
Feywild
Stringoptional
Birthdatebirthdate

Date of birth (any readable format).

Example
14 Summer 1492
Stringoptional
Statusstatus

Current status (Alive, Deceased, Unknown, etc.).

Example
Alive
Stringoptional
Speciesspecies

Race or species.

Example
Ayldarzi
Stringoptional
Gendergender

Gender identity.

Example
Male
Stringoptional
Orientationorientation

Sexual orientation.

Example
Pansexual
Stringoptional
Partnerspartners

Romantic or bonded partners.

Example
Vael
Stringoptional
Educationeducation

Training, schooling, or institutions.

Example
Arcane College of Ilina
Stringoptional

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
}}