Template:Infobox class: Difference between revisions

From TF2 Classic Wiki
Jump to navigation Jump to search
m (Technochips moved page Template:ClassInfobox to Template:Infobox class without leaving a redirect: proper name)
m (Testing something. May return it when done testing.)
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{| class="wikitable" align=right width=200px
<includeonly>
{| class="infobox" width=320px
|+
|+
! colspan="2" | {{#if: {{{title|}}} | {{{title|}}} | {{PAGENAME}}}}
! class="infobox-title" colspan="2" | {{{title|{{PAGENAME}}}}}
{{#ifexist: File:{{#if: {{{image|}}}|{{{image|}}}|{{PAGENAME}}}} RED.webp |
{{#ifexist: File:{{{image|{{PAGENAME}}}}} RED.png |
{{!}}-
{{!}}-
{{!}} colspan="2" {{!}}
{{!}} class="infobox-image" colspan="2" {{!}}
<tabber>RED=[[File:{{#if: {{{image|}}}|{{{image|}}}|{{PAGENAME}}}} RED.webp|center|frameless]]
{{Switcher
|-|BLU=[[File:{{#if: {{{image|}}}|{{{image|}}}|{{PAGENAME}}}} BLU.webp|center|frameless]]
|[[File:{{{image|{{PAGENAME}}}}} RED.png|center|frameless|256px]]
|-|GRN=[[File:{{#if: {{{image|}}}|{{{image|}}}|{{PAGENAME}}}} GRN.webp|center|frameless]]
|RED
|-|YLW=[[File:{{#if: {{{image|}}}|{{{image|}}}|{{PAGENAME}}}} YLW.webp|center|frameless]]
|[[File:{{{image|{{PAGENAME}}}}} BLU.png|center|frameless|256px]]
</tabber>
|BLU
}}
|[[File:{{{image|{{PAGENAME}}}}} GRN.png|center|frameless|256px]]
|GRN
|[[File:{{{image|{{PAGENAME}}}}} YLW.png|center|frameless|256px]]
|YLW}}|{{#ifexist: File:{{{image|{{PAGENAME}}}}}.png |
{{!}}-
{{!}} class="infobox-image" colspan="2" {{!}}
[[File:{{{image|{{PAGENAME}}}}}.png|center|frameless|256px]]}}}}
|+
|+
! colspan="2" | Basic Information
! colspan="2" | Basic Information
{{#if: {{{class|}}} |
{{#if: {{{class|}}} |
{{!}}-
{{!}}-
{{!}} Icon {{!!}} [[File:{{{class|}}}.webp]]
{{!}} Icon {{!!}} [[File:{{{class}}}.png]]
}}
}}
{{#if: {{{type|}}} |
{{#if: {{{type|}}} |
{{!}}-
{{!}}-
{{!}} Type {{!!}} [[Classes#{{{type|}}}|{{{type|}}}]]
{{!}} Type {{!!}} [[Classes#{{{type}}}|{{{type}}}]]}}
}}
{{#if: {{{health|}}} |
{{#if: {{{health|}}} |
{{!}}-
{{!}}-
{{!}} Health {{!!}} {{{health|}}} {{#if: {{{overhealed|}}} | ({{{overhealed|}}} if overhealed)}}
{{!}} Health {{!!}} {{{health}}} {{#if: {{{overhealed|}}} | ({{{overhealed}}} with overheal)}}
}}
}}
{{#if: {{{speed|}}} |
{{#if: {{{speed|}}} |
{{!}}-
{{!}}-
{{!}} Speed {{!!}} {{{speed|}}}%
{{!}} Speed {{!!}} {{{speed}}}%
}}
}}
|}
|}
<noinclude>
[[Category:{{{title|{{PAGENAME}}}}}]]
Example usage:
{{#if: {{{type|}}} | [[Category:{{{type|}}} classes]]}} </includeonly>
<pre>
<noinclude> <templatedata>
{{Infobox class
{
| title=Scout
"params": {
| image=Scout
"title": {
| class=Leaderboard_class_scout
"description": "Name of the class. (only use when it doesn't match page name)",
| type=Offensive
"type": "string"
| health=125
},
| overhealed=125
"image": {
| speed=133
"description": "Prefix for the images of the class. (only use when it doesn't match page name)",
}}
"type": "wiki-file-name"
</pre>
},
"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
}
},
"description": "Infobox for class pages."
}
</templatedata>
[[Category:Infobox]]
[[Category:Infobox]]
</noinclude>
</noinclude>

Latest revision as of 00:27, 27 June 2024

Infobox for class pages.

Template parameters

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