Difference between revisions of "Template:Character"

From The Kingkiller Chronicle Wiki
Jump to navigation Jump to search
m (Reverted edits by Corey (talk) to last revision by Multinerd)
Tag: Rollback
 
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{| class="rsw-infobox plainlinks" id="infobox-character" cellpadding="0" cellspacing="0"
+
<includeonly>
|-
+
<infobox layout="stacked">
! class="infobox-header" colspan=2 | '''{{PAGENAME}}'''
+
  <title source="title">
|-
+
    <default>'''{{PAGENAME}}'''</default>
| class="infobox-image" colspan="2" | {{#if:{{{image}}}|{{{image}}}|[[Category:Needs image]][[Special:Upload|Please upload an image!]]}}
+
  </title>
|-
+
  <image source="image">
! class="infobox-header" colspan=2 | '''Biographical information'''
+
    <caption source="caption"/>
|-
+
  </image>
! nowrap="nowrap" | Full name
+
  <group>
| {{#if:{{{fullname|}}}|{{{fullname}}}|Unknown <small>[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit]</small>}}
+
    <header>Biographical Information</header>
|-
+
    <data source="fullname">
! nowrap="nowrap" | Gender
+
      <label>Full name</label>
| {{#if:{{{gender|}}}|{{{gender}}}|Unknown <small>[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit]</small>}}
+
      <default>Unknown</default>
|-
+
    </data>
! nowrap="nowrap" | Status
+
<data source="alias">
| {{#if:{{{status|}}}|{{{status}}}|Unknown <small>[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit]</small>}}
+
      <label>Alias(es)</label>
|-
+
      <default>None</default>
! class="infobox-header" colspan=2 | '''Appearance'''
+
    </data>
|-
+
<data source="age">
! nowrap="nowrap" | Eye color
+
      <label>Age</label>
| {{#if:{{{eyecolor|}}}|{{{eyecolor}}}|Unknown <small>[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit]</small>}}
+
      <default>Unknown</default>
|-
+
    </data>
! nowrap="nowrap" | Hair color
+
    <data source="gender">
| {{#if:{{{haircolor|}}}|{{{haircolor}}}|Unknown <small>[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit]</small>}}
+
      <label>Gender</label>
|-
+
      <default>Unknown</default>
| colspan="2" class="infobox-template-links" | [[Template:Character|Infobox]] {{*}} [[Template talk:Character|Talk page]]
+
    </data>
|-
+
    <data source="status">
|}
+
      <label>Status</label>
 +
      <default>Unknown</default>
 +
    </data>
 +
<data source="family">
 +
      <label>Family Members</label>
 +
      <default>Unknown</default>
 +
    </data>  
 +
  </group>
 +
  <group>
 +
    <header>Appearance</header>
 +
  <data source="species">
 +
      <label>Species</label>
 +
      <default>Unknown</default>
 +
    </data>
 +
  <data source="ethnicity">
 +
      <label>Ethnicity</label>
 +
      <default>Unknown</default>
 +
    </data>
 +
    <data source="eyecolor">
 +
      <label>Eye color</label>
 +
      <default>Unknown</default>
 +
    </data>
 +
    <data source="haircolor">
 +
      <label>Hair color</label>
 +
      <default>Unknown</default>
 +
    </data>
 +
    <data source="skincolor">
 +
      <label>Skin color</label>
 +
      <default>Unknown</default>
 +
    </data>
 +
</group>
 +
  <group>
 +
    <header>Personal Information</header>
 +
    <data source="occupation">
 +
      <label>Occupation</label>
 +
      <default>None</default>
 +
    </data>
 +
    <data source="field">
 +
      <label>Field of Study</label>
 +
      <default>None</default>
 +
    </data>
 +
    <data source="rank">
 +
      <label>Rank</label>
 +
      <default>Unknown</default>
 +
    </data>
 +
  </group>
 +
</infobox>
 +
 
 
[[Category:Characters]]
 
[[Category:Characters]]
</includeonly><noinclude>{{/doc}}</noinclude>
+
 
 +
{{#switch: {{lc:{{{gender}}}}}
 +
| female = [[Category:Gender:_Female]][[Character gender::Female| ]]
 +
| male  = [[Category:Gender:_Male]][[Character gender::Male| ]]
 +
| unknown = [[Category:Gender:_Unknown]][[Character gender::Unknown| ]]
 +
| #default = [[Category:Characters with an undefined gender]][[Character gender::Unknown| ]]
 +
}}
 +
 
 +
{{#switch: {{lc:{{{type}}}}}
 +
| background = [[Category:Background characters]][[Character type::Background| ]]
 +
| major = [[Category:Major Characters]][[Character type::Major| ]]
 +
| #default = [[Category:Minor Characters]][[Character type::Minor| ]]
 +
}}
 +
 
 +
{{#switch: {{lc:{{{status}}}}}
 +
| alive = [[Category:Status:_Alive]][[Character status::Alive| ]]
 +
| deceased = [[Category:Status:_Deceased]][[Character status::Deceased| ]]
 +
| unknown = [[Category:Status:_Unknown]][[Character status::Unknown| ]]
 +
| #default = [[Category:Status:_Unknown]][[Character status::Unknown| ]]
 +
}}
 +
</includeonly>
 +
<noinclude>
 +
{{/doc}}
 +
{{TemplateData|<templatedata>
 +
{
 +
"params": {
 +
"age": {
 +
"label": "Age",
 +
"description": "The character's age, preferably in years.",
 +
"example": "18",
 +
"type": "string"
 +
},
 +
"alias": {
 +
"label": "Alias(es)",
 +
"description": "Alternate names for a character.",
 +
"example": "Kvothe Kingkiller, Maedre, Kvothe the Bloodless",
 +
"type": "string"
 +
},
 +
"ethnicity": {
 +
"label": "Ethnicity",
 +
"description": "The character's ethnicity.",
 +
"example": "Edema Ruh",
 +
"type": "string"
 +
},
 +
 
 +
"eyecolor": {
 +
"label": "Eye color",
 +
"description": "Character's eye color",
 +
"example": "Green",
 +
"type": "string"
 +
},
 +
"family": {
 +
"label": "Family Members",
 +
"description": "Known members of someone's family.",
 +
"example": "Arliden, Laurian",
 +
"type": "string"
 +
},
 +
"field": {
 +
"label": "Field of Study",
 +
"description": "What a character is studying, either independently or at The University",
 +
"example": "Chemistry, Naming, Sympathy",
 +
"type": "string"
 +
},
 +
"fullname": {
 +
"label": "Full name",
 +
"description": "Full name of the character",
 +
"example": "Kvothe, son of Arliden",
 +
"type": "string"
 +
},
 +
"gender": {
 +
"label": "Gender",
 +
"description": "Character's gender",
 +
"example": "Male",
 +
"type": "string",
 +
"required": true
 +
},
 +
"haircolor": {
 +
"label": "Hair color",
 +
"description": "Character's hair color",
 +
"example": "Red",
 +
"type": "string"
 +
},
 +
"image": {
 +
"label": "Character image",
 +
"description": "File link to the character image",
 +
"example": "[[File:MainPage-Kvothe.jpg]]",
 +
"type": "wiki-file-name"
 +
},
 +
"occupation": {
 +
"label": "Occupation",
 +
"description": "What the character does for a living, a job.",
 +
"example": "Student",
 +
"type": "string"
 +
},
 +
"rank": {
 +
"label": "Rank",
 +
"description": "What rank a character is",
 +
"example": "Re'lar, King, Maer",
 +
"type": "string"
 +
},
 +
"skincolor": {
 +
"label": "Skin Color",
 +
"description": "What color a character's skin is",
 +
"example": "Pale",
 +
"type": "string"
 +
},
 +
"species": {
 +
"label": "Species",
 +
"description": "What species a character is.",
 +
"example": "Human",
 +
"type": "string"
 +
},
 +
"status": {
 +
"label": "Status",
 +
"description": "Character's status",
 +
"example": "Alive",
 +
"required": true,
 +
"type": "string"
 +
},
 +
"type": {
 +
"label": "Type",
 +
"description": "Type of character: Major/Minor",
 +
"example": "Major",
 +
"type": "string"
 +
}
 +
},
 +
"description": "Creates an infobox for Character pages",
 +
"format": "block"
 +
}
 +
</templatedata>}}
 +
</noinclude>

Latest revision as of 02:47, 27 December 2019


Template:Character/doc

Data

Show/hide template's data

The following information is used by extensions and applications, such as VisualEditor, to help users implement this template onto pages. Please ensure that it is up-to-date.

Creates an infobox for Character pages

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Ageage

The character's age, preferably in years.

Example
18
Stringoptional
Alias(es)alias

Alternate names for a character.

Example
Kvothe Kingkiller, Maedre, Kvothe the Bloodless
Stringoptional
Ethnicityethnicity

The character's ethnicity.

Example
Edema Ruh
Stringoptional
Eye coloreyecolor

Character's eye color

Example
Green
Stringoptional
Family Membersfamily

Known members of someone's family.

Example
Arliden, Laurian
Stringoptional
Field of Studyfield

What a character is studying, either independently or at The University

Example
Chemistry, Naming, Sympathy
Stringoptional
Full namefullname

Full name of the character

Example
Kvothe, son of Arliden
Stringoptional
Gendergender

Character's gender

Example
Male
Stringrequired
Hair colorhaircolor

Character's hair color

Example
Red
Stringoptional
Character imageimage

File link to the character image

Example
[[File:MainPage-Kvothe.jpg]]
Fileoptional
Occupationoccupation

What the character does for a living, a job.

Example
Student
Stringoptional
Rankrank

What rank a character is

Example
Re'lar, King, Maer
Stringoptional
Skin Colorskincolor

What color a character's skin is

Example
Pale
Stringoptional
Speciesspecies

What species a character is.

Example
Human
Stringoptional
Statusstatus

Character's status

Example
Alive
Stringrequired
Typetype

Type of character: Major/Minor

Example
Major
Stringoptional