Template:Infobox character: Difference between revisions
m (changed doc from referencing sandbox) |
(code clean up & adjusted image section, changing parameters) |
||
Line 6: | Line 6: | ||
{{Infobox character | {{Infobox character | ||
| name = name | | name = name | ||
| | | image = Image.png | ||
| image2 = Image.png | | image2 = Image.png | ||
| image3 = Image.png | | image3 = Image.png | ||
| image4 = Image.png | | image4 = Image.png | ||
| image5 = Image.png | | image5 = Image.png | ||
| | | image_name = image1 | ||
| | | image_name2 = image2 | ||
| | | image_name3 = image3 | ||
| | | image_name4 = image4 | ||
| | | image_name5 = image5 | ||
| nickname = nickname | | nickname = nickname | ||
| sex = sex | | sex = sex | ||
Line 28: | Line 28: | ||
<syntaxhighlight lang=text>{{Infobox character | <syntaxhighlight lang=text>{{Infobox character | ||
| name = | | name = | ||
| | | image = | ||
| image2 = | | image2 = | ||
| image3 = | | image3 = | ||
| image4 = | | image4 = | ||
| image5 = | | image5 = | ||
| | | image_name = | ||
| | | image_name2 = | ||
| | | image_name3 = | ||
| | | image_name4 = | ||
| | | image_name5 = | ||
<!-- GENERAL --> | <!-- GENERAL --> | ||
| nickname = | | nickname = | ||
Line 53: | Line 53: | ||
{{Infobox character | {{Infobox character | ||
| name = Kate Smith | | name = Kate Smith | ||
| | | image = Kate Smith.png | ||
| image2 = 805 max.jpg | | image2 = 805 max.jpg | ||
| | | image_name = In-game | ||
| | | image_name2 = Portrait | ||
| sex = Female | | sex = Female | ||
| personality = Friendly | | personality = Friendly | ||
Line 65: | Line 65: | ||
<syntaxhighlight lang=text>{{Infobox character | <syntaxhighlight lang=text>{{Infobox character | ||
| name = Kate Smith | | name = Kate Smith | ||
| | | image = Kate Smith.png | ||
| image2 = 805 max.jpg | | image2 = 805 max.jpg | ||
| | | image_name = In-game | ||
| | | image_name2 = Portrait | ||
<!-- GENERAL --> | <!-- GENERAL --> | ||
| sex = Female | | sex = Female | ||
Line 97: | Line 97: | ||
{{ll|Category:Infobox}} | {{ll|Category:Infobox}} | ||
</noinclude><includeonly>{{Infobox/sandbox | </noinclude><includeonly>{{Infobox/sandbox | ||
| title = {{{name|{{#getdisplaytitle:{{FULLPAGENAME}}}}}}} | |||
| color = var(--color-red) | |||
| {{Infobox/image <!-- ## Image --> | |||
| p1 = {{#if:{{{image|}}}|[[File:{{{image}}}|{{{image_size|}}}|{{{image_name|{{{name|}}}}}}]]}} | |||
| 1 = {{#if:{{{image2|}}}|[[File:{{{icon|{{{image}}}}}}|{{{icon_name|{{{image_name|{{{name|}}}}}}}}}|link=]]}} | |||
| p2 = {{#if:{{{image2|}}}|[[File:{{{image2}}}|{{{image_size2|}}}|{{{image_name2|{{{name|}}}}}}]]}} | |||
| 2 = {{#if:{{{image2|}}}|[[File:{{{icon2|{{{image2}}}}}}|{{{icon_name2|{{{image_name2|{{{name|}}}}}}}}}|link=]]}} | |||
| p3 = {{#if:{{{image3|}}}|[[File:{{{image3}}}|{{{image_size3|}}}|{{{image_name3|{{{name|}}}}}}]]}} | |||
| 3 = {{#if:{{{image3|}}}|[[File:{{{icon3|{{{image3}}}}}}|{{{icon_name3|{{{image_name3|{{{name|}}}}}}}}}|link=]]}} | |||
| p4 = {{#if:{{{image4|}}}|[[File:{{{image4}}}|{{{image_size4|}}}|{{{image_name4|{{{name|}}}}}}]]}} | |||
| 4 = {{#if:{{{image4|}}}|[[File:{{{icon4|{{{image4}}}}}}|{{{icon_name4|{{{image_name4|{{{name|}}}}}}}}}|link=]]}} | |||
| p5 = {{#if:{{{image5|}}}|[[File:{{{image5}}}|{{{image_size5|}}}|{{{image_name5|{{{name|}}}}}}]]}} | |||
| 5 = {{#if:{{{image5|}}}|[[File:{{{icon5|{{{image5}}}}}}|{{{icon_name5|{{{image_name5|{{{name|}}}}}}}}}|link=]]}} | |||
| caption = {{#if: {{{image_caption|}}}|''{{{image_caption|}}}''}} | |||
}}{{#if:{{{nickname|{{{sex|{{{personality|{{{occupation|{{{traits|{{{location|}}}}}}}}}}}}}}}}}} | |||
| {{Infobox/section <!-- ## General ## --> | |||
| {{tt|name=Infobox character|default=General|arg1=general}} | |||
| color = var(--color-red) | |||
| id = character-general | |||
| {{#if:{{{nickname|}}} | |||
|{{Infobox/sandbox/row | |||
|{{tt|name=Infobox character|default=Nickname|arg1=nickname}} | |||
|{{{nickname|}}} | |||
}} | |||
}}}} | }}{{#if:{{{sex|}}} | ||
|{{Infobox/sandbox/row | |||
|{{tt|name=Infobox character|default=Sex|arg1=sex}} | |||
|{{{sex|}}} | |||
}} | |||
}}{{#if:{{{personality|}}} | |||
}}}} | |{{Infobox/sandbox/row | ||
|{{tt|name=Infobox character|default=Personality|arg1=personality}} | |||
|{{{personality|}}} | |||
}} | |||
}}{{#if:{{{occupation|}}} | |||
|{{Infobox/sandbox/row | |||
}}}} | |{{tt|name=Infobox character|default=Occupation|arg1=occupation}} | ||
|{{{occupation|}}} | |||
}} | |||
}}{{#if:{{{traits|}}} | |||
|{{Infobox/sandbox/row | |||
|{{tt|name=Infobox character|default=Traits|arg1=traits}} | |||
}}}} | |{{{traits|}}} | ||
}} | |||
}}{{#if:{{{location|}}} | |||
|{{Infobox/sandbox/row | |||
|{{tt|name=Infobox character|default=Location|arg1=location}} | |||
|{{{location|}}}<br>{{#if:{{{coordinates|}}}|[[File:Geographylogo.png{{!}}26px{{!}}link=https://map.projectzomboid.com/?#{{{coordinates}}}{{!}}Show location on an interactive map.]]<span class="plainlinks" title="Show location on an interactive map.">[https://map.projectzomboid.com/?#{{{coordinates}}} {{{coordinates}}}]</span>}} | |||
}}}} | }} | ||
}} | |||
}} | |||
}}{{#if:{{{items|}}} | |||
|{{Infobox/section <!-- ## Items ## --> | |||
| {{tt|name=Infobox character|default=Items|arg1=items}} | |||
}}}} | | color = var(--color-red) | ||
| id = character-items | |||
| <div style{{=}}"padding:0em 0.5em 0.5em;">{{{items|}}}</div> | |||
}} | |||
}} | |||
}}</includeonly> | }}</includeonly> |
Revision as of 02:34, 10 February 2024
{{Improve}}
. Last edit was 10/02/2024.This is an infobox used on articles about an in-game character.
Usage
{{Infobox character
| name =
| image =
| image2 =
| image3 =
| image4 =
| image5 =
| image_name =
| image_name2 =
| image_name3 =
| image_name4 =
| image_name5 =
<!-- GENERAL -->
| nickname =
| sex =
| personality =
| occupation =
| traits =
| location =
| coordinates =
<!-- ITEMS -->
| items =
}}
Example
{{Infobox character
| name = Kate Smith
| image = Kate Smith.png
| image2 = 805 max.jpg
| image_name = In-game
| image_name2 = Portrait
<!-- GENERAL -->
| sex = Female
| personality = Friendly
| location = Kate and Baldspot's safehouse
| coordinates = 10746x9415
<!-- ITEMS -->
| items = Crutches, Bandages, Painkillers, Pillow
}}
How to translate
This template is translatable.
Template code
Paste the following code into the <includeonly>
tag of the translated template and translate the text after each =
sign (except for #default =
).
{{#switch: {{{1|}}}
<!-- section -->
| general = General
| items = Items
<!-- data -->
| nickname = Nickname
| sex = Sex
| personality = Personality
| occupation = Occupation
| traits = Traits
| location = Location
| #default = [[Category:Incorrect template usage]]
}}
Template documentation
Copy the code wrapped in the <noinclude>
tag in this template and translate the text after doc =
in the {{Documentation}}
template.
{{Translation guide}}
template should be removed from the translated documentation.