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 -->
<!-- Show the box only if there’s any data -->
{{#if:{{{name|}}}{{{image|}}}{{{caption|}}}{{{aliases|}}}{{{loyalties|}}}{{{title|}}}{{{role|}}}{{{birthplace|}}}{{{birthdate|}}}{{{status|}}}{{{species|}}}{{{gender|}}}{{{orientation|}}}{{{partners|}}}{{{education|}}}|
{{#if:{{{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="float:left; clear:left; margin:0 15px 10px 0; border:1px solid #AAA; background-color:#F9F9F9; width:300px; padding:8px; font-size:90%; line-height:1.4em;">
 
  <!-- Name (centered, bold) -->
  {{#if:{{{name|}}}|
  <div style="text-align:center; font-size:120%; font-weight:bold; margin-bottom:6px;">
    {{{name}}}
  </div>
  }}


   <!-- Image + Caption -->
   <!-- Image + Caption -->
Line 19: Line 12:
   }}
   }}


   <!-- Labeled data rows (only show rows that have values) -->
   <!-- Data Table -->
   <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:{{{aliases|}}}|<tr><td style="vertical-align:top; width:35%; font-weight:bold;">Aliases</td><td>{{{aliases}}}</td></tr>}}
Line 42: Line 35:
<templatedata>
<templatedata>
{
{
   "description": "Character infobox with centered name, image and caption below, and labeled fields in a two-column list. Empty fields are hidden automatically.",
   "description": "A left-floating character infobox that starts with the image, allowing text to flow beside it.",
   "params": {
   "params": {
    "name": {
      "label": "Name",
      "description": "Full name of the character.",
      "type": "string",
      "required": false,
      "example": "Valkaénnar Vaeari"
    },
     "image": {
     "image": {
       "label": "Image",
       "label": "Image",
       "description": "Image file name (omit the 'File:' prefix).",
       "description": "File name of the image (omit 'File:').",
       "type": "string",
       "type": "string",
       "required": false,
       "required": false
      "example": "Valkaennar.jpg"
     },
     },
     "caption": {
     "caption": {
       "label": "Caption",
       "label": "Caption",
       "description": "Short caption or quote under the image.",
       "description": "Text 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",
       "type": "string",
       "required": false,
       "required": false
      "example": "Vael"
     },
     },
     "education": {
     "aliases": {"label": "Aliases", "description": "Alternate names or titles.", "type": "string"},
      "label": "Education",
    "loyalties": {"label": "Loyalties", "description": "Organizations or allegiances.", "type": "string"},
      "description": "Training, schooling, or institutions.",
    "title": {"label": "Title", "description": "Formal or informal title(s).", "type": "string"},
      "type": "string",
    "role": {"label": "Role", "description": "Occupation or story role.", "type": "string"},
      "required": false,
    "birthplace": {"label": "Birthplace", "description": "Place of origin.", "type": "string"},
      "example": "Arcane College of Ilina"
    "birthdate": {"label": "Birthdate", "description": "Character’s date of birth.", "type": "string"},
     }
    "status": {"label": "Status", "description": "Current state (Alive, Deceased, etc.).", "type": "string"},
    "species": {"label": "Species", "description": "Race or species.", "type": "string"},
    "gender": {"label": "Gender", "description": "Gender identity.", "type": "string"},
    "orientation": {"label": "Orientation", "description": "Sexual orientation.", "type": "string"},
    "partners": {"label": "Partners", "description": "Romantic or bonded partners.", "type": "string"},
     "education": {"label": "Education", "description": "Training or schooling.", "type": "string"}
   }
   }
}
}
Line 154: Line 66:


== Usage ==
== 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        = Valkaénnar Vaeari
| image      = Example.jpg
| image      = Valkaennar.jpg
| caption    = Example Caption
| caption    = The Lord of Stillness.
| aliases    = The Shadow
| aliases    = Lucien Brumenoir; Klaus von Nibelheim
| loyalties  = House Vaeari
| loyalties  = House Vaeari; Equinox
| title      = Lord
| title      = Marquis; Graf
| role        = Enchanter
| role        = Enchanter; Swordmage
| birthplace  = Ilina
| birthplace  = Feywild
| birthdate  = 14th Sun of Summer, 1492
| birthdate  = 14 Summer 1492
| status      = Alive
| status      = Alive
| species    = Ayldarzi
| species    = Ayldarzi
Line 202: Line 84:
}}
}}
</pre>
</pre>
This box will appear on the **left side** of the page, with normal text wrapping around it.
</noinclude>
</noinclude>

Revision as of 13:20, 30 October 2025


A left-floating character infobox that starts with the image, allowing text to flow beside it.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Imageimage

File name of the image (omit 'File:').

Stringoptional
Captioncaption

Text under the image.

Stringoptional
Aliasesaliases

Alternate names or titles.

Stringoptional
Loyaltiesloyalties

Organizations or allegiances.

Stringoptional
Titletitle

Formal or informal title(s).

Stringoptional
Rolerole

Occupation or story role.

Stringoptional
Birthplacebirthplace

Place of origin.

Stringoptional
Birthdatebirthdate

Character’s date of birth.

Stringoptional
Statusstatus

Current state (Alive, Deceased, etc.).

Stringoptional
Speciesspecies

Race or species.

Stringoptional
Gendergender

Gender identity.

Stringoptional
Orientationorientation

Sexual orientation.

Stringoptional
Partnerspartners

Romantic or bonded partners.

Stringoptional
Educationeducation

Training or schooling.

Stringoptional

Usage

{{Infobox character
| image       = Example.jpg
| caption     = Example Caption
| aliases     = The Shadow
| loyalties   = House Vaeari
| title       = Lord
| role        = Enchanter
| birthplace  = Ilina
| birthdate   = 14th Sun of Summer, 1492
| status      = Alive
| species     = Ayldarzi
| gender      = Male
| orientation = Pansexual
| partners    = Vael
| education   = Arcane College of Ilina
}}

This box will appear on the **left side** of the page, with normal text wrapping around it.