Template:Infobox class: Difference between revisions

From TF2 Classified Wiki
Jump to navigation Jump to search
Experimental - Importing infobox from https://tf2c.fandom.com/wiki/Template:Infobox_class, originally by Technochips
 
Ryo567 (talk | contribs)
added /es
 
(47 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{| class="wikitable" align=right width=200px
{| class="infobox" width=320px
|+
|+
! colspan="2" | {{#if: {{{title|}}} | {{{title|}}} | {{PAGENAME}}}}
! class="infobox-title" colspan="2" | {{{title|{{PAGENAME}}}}}
{{#ifexist: File:{{#if: {{{image|}}}|{{{image|}}}|{{PAGENAME}}}} RED.png |
{{#ifexist: File:{{{image|{{PAGENAME}}}}}_red.png |
{{!}}-
{{!}}-
{{!}} colspan="2" {{!}}
{{!}} class="infobox-image" colspan="2" {{!}}
<tabber>RED=[[File:{{#if: {{{image|}}}|{{{image|}}}|{{PAGENAME}}}} RED.png|center|frameless]]
{{Switcher
|-|BLU=[[File:{{#if: {{{image|}}}|{{{image|}}}|{{PAGENAME}}}} BLU.png|center|frameless]]
|[[File:{{{image|{{PAGENAME}}}}}_red.png|center|frameless|256px]]
|-|GRN=[[File:{{#if: {{{image|}}}|{{{image|}}}|{{PAGENAME}}}} GRN.png|center|frameless]]
|RED
|-|YLW=[[File:{{#if: {{{image|}}}|{{{image|}}}|{{PAGENAME}}}} YLW.png|center|frameless]]
|[[File:{{{image|{{PAGENAME}}}}}_blue.png|center|frameless|256px]]
</tabber>
|BLU
|[[File:{{{image|{{PAGENAME}}}}}_yellow.png|center|frameless|256px]]
|YLW
|[[File:{{{image|{{PAGENAME}}}}}_green.png|center|frameless|256px]]
|GRN
|[[File:{{{image|{{PAGENAME}}}}}_global.png|center|frameless|256px]]
|Global}}|{{#ifexist: File:{{{image|{{PAGENAME}}}}}.png |
{{!}}-
{{!}} class="infobox-image" colspan="2" {{!}}
[[File:{{{image|{{PAGENAME}}}}}.png|center|frameless|256px]]}}}}
|+
! colspan="2" | {{Lang
| en = Basic Information
| es = Información básica
| fr = Informations de base
| zh-hans = 基本信息
}}
}}
|+
! colspan="2" | Basic Information
{{#if: {{{class|}}} |
{{#if: {{{class|}}} |
{{!}}-
{{!}}-
{{!}} Icon {{!!}} [[File:{{{class|}}}.png]]
{{!}} {{Lang
| en = Icon
| es = Icono
| fr = Icône
| zh-hans = 图标
}} {{!!}} [[File:{{{class}}}.png]]
}}
}}
{{#if: {{{type|}}} |
{{#if: {{{type|}}} |
{{!}}-
{{!}}-
{{!}} Type {{!!}} [[Classes#{{{type|}}}|{{{type|}}}]]
{{!}} {{Lang
| en = Type
| es = Tipo
| fr = Type
| zh-hans = 类型
}} {{!!}} {{ #switch: {{{type}}}
| Offensive = {{Lang
| en = [[Classes#Offense|Offensive]]
| es = [[Classes/es#Ataque|Ataque]]
| fr = [[Classes/fr#Attaque|Offensif]]
| zh-hans = [[Classes/zh-hans#Offense|进攻型]]
}}
| Defensive = {{Lang
| en = [[Classes#Defense|Defensive]]
| es = [[Classes/es#Defensa|Defensa]]
| fr = [[Classes/fr#Défense|Défensif]]
| zh-hans = [[Classes/zh-hans#Defense|防守型]]
}}
| Support = {{Lang
| en = [[Classes#Support|Support]]
| es = [[Classes/es#Apoyo|Apoyo]]
| fr = [[Classes/fr#Support|Support]]
| zh-hans = [[Classes/zh-hans#Support|支援型]]
}}
| Special = {{Lang
| en = [[Classes#Special|Special]]
| es = [[Classes/es#Especial|Especial]]
| fr = [[Classes/fr#Spécial|Spécial]]
| zh-hans = [[Classes/zh-hans#Special|特殊兵种]]
}}
}}
}}
}}
{{#if: {{{health|}}} |
{{#if: {{{health|}}} |
{{!}}-
{{!}}-
{{!}} Health {{!!}} {{{health|}}} {{#if: {{{overhealed|}}} | ({{{overhealed|}}} if overhealed)}}
{{!}} {{Lang
| en = Health
| es = Salud
| fr = Santé
| zh-hans = 生命值
}} {{!!}} {{{health}}} {{#if: {{{overhealed|}}} | ({{{overhealed}}} {{Lang
| en = with overheal
| es = con exceso de curación
| fr = avec overheal
| zh-hans = 超量治疗
}})}}
}}
}}
{{#if: {{{speed|}}} |
{{#if: {{{speed|}}} |
{{!}}-
{{!}}-
{{!}} Speed {{!!}} {{{speed|}}}%
{{!}} {{Lang
| en = Speed
| es = Velocidad
| fr = Vitesse
| zh-hans = 速度
}} {{!!}} {{{speed}}}%
}}
}}
|}
|}
<noinclude>
<includeonly>
Example usage:
{{#if: {{{nocategory|{{NAMESPACE}}}}}||[[Category:Classes{{#ifeq:{{PAGELANGUAGE}}|en||/{{PAGELANGUAGE}}}}]]
<pre>
{{#if: {{{type|}}}|[[Category:{{{type}}} classes{{#ifeq:{{PAGELANGUAGE}}|en||/{{PAGELANGUAGE}}}}]]}}}}</includeonly>
{{Infobox class
<noinclude> <templatedata>
| title=Scout
{
| image=Scout
"params": {
| class=Leaderboard_class_scout
"title": {
| type=Offensive
"description": "Name of the class. (only use when it doesn't match page name)",
| health=125
"type": "string"
| overhealed=125
},
| speed=133
"image": {
}}
"description": "Prefix for the images of the class. (only use when it doesn't match page name)",
</pre>
"type": "wiki-file-name"
[[Category:Infobox]]
},
"class": {
"description": "Icon of the class.",
"type": "wiki-file-name",
"suggested": true
},
"type": {
"description": "Type of the class.",
"type": "string",
"suggested": true
},
"health": {
"description": "Health of the class.",
"type": "number",
"suggested": true
},
"overhealed": {
"description": "Health of the class, when overhealed.",
"type": "number",
"suggested": true
},
"speed": {
"description": "Speed of the class.",
"type": "number",
"suggested": true
},
"nocategory": {
"description": "Disables categories.",
"type": "boolean"
}
},
"description": "Infobox for class pages."
}
</templatedata>
[[Category:Infobox templates]]
</noinclude>
</noinclude>

Latest revision as of 21:33, 12 April 2026

Infobox class
Basic Information



Infobox for class pages.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
titletitle

Name of the class. (only use when it doesn't match page name)

Stringoptional
imageimage

Prefix for the images of the class. (only use when it doesn't match page name)

Fileoptional
classclass

Icon of the class.

Filesuggested
typetype

Type of the class.

Stringsuggested
healthhealth

Health of the class.

Numbersuggested
overhealedoverhealed

Health of the class, when overhealed.

Numbersuggested
speedspeed

Speed of the class.

Numbersuggested
nocategorynocategory

Disables categories.

Booleanoptional