Template:Infobox map: Difference between revisions

From TF2 Classified Wiki
Jump to navigation Jump to search
Testing an infobox template with code copied from StackOverflow
 
VivaRomania (talk | contribs)
m Figured out I could source some proper French translations for these templates from the TF2 wiki
 
(24 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<div class="infobox">
<includeonly> {| class="infobox" width=320px
<div class="infobox-title">{{{title|{{PAGENAME}}}}}</div>{{#if:{{{image|}}}|
|+
<div class="infobox-image">[[File:{{{image}}}|300px]]</div>}}
! class="infobox-title" colspan="2" | {{{map-name-override|{{PAGENAME}}}}}
<table>{{#if:{{{param1|}}}|<tr>
{{#ifexist: File:{{{map-image|}}} |
    <th>Parameter 1</th>
{{!}}-
    <td>{{{param1}}}</td>
{{!}} class="infobox-image" colspan="2" {{!}} [[File:{{{map-image|}}}|320px]] | }}
</tr>}}{{#if:{{{param2|}}}|<tr>
|+
    <th>Parameter 2</th>
! colspan="2" | {{Lang
    <td>{{{param2}}}</td>
| en = Basic Information
</tr>}}{{#if:{{{param3|}}}|<tr>
| fr = Informations de base
    <th>Parameter 3</th>
}}
    <td>{{{param3}}}</td>
{{#if: {{{game-type|}}} |
</tr>}}{{#if:{{{param4|}}}|<tr>
{{!}}-
    <th>Parameter 4</th>
{{!}} {{Lang
    <td>{{{param4}}}</td>
| en = Map type
</tr>}}{{#if:{{{param5|}}}|<tr>
| fr = Type de carte
    <th>Parameter 5</th>
}} {{!!}} [[{{{game-type|}}}]] {{#if: {{{four-team|}}} | ([[Four-Team]])}} {{#if: {{{medieval|}}} | ([[Medieval]])}}
    <td>{{{param5}}}</td>
}}
</tr>}}</table>
{{#if: {{{file-name|}}} |
</div>
{{!}}-
{{!}} {{Lang
| en = File name
| fr = Nom du fichier
}} {{!!}} <code>{{{file-name|}}}</code>
}}
{{#if: {{{release-date|}}} |
{{!}}-
{{!}} {{Lang
| en = Release date
| fr = Date d'ajout
}} {{!!}} {{{release-date|}}}
}}
{{#if: {{{developer|}}} |
{{!}}-
{{!}} {{Lang
| en = Developer(s)
| fr = Développeur(s)
}} {{!!}} {{{developer|}}}
}}
{{#if: {{{link|}}} |
{{!}}-
{{!}} {{Lang
| en = Link(s)
| fr = Lien(s)
}} {{!!}} {{{link|}}}
}}
|+
! colspan="2" | {{Lang
| en = Map info
| fr = Informations sur la carte
}}
{{#if: {{{map-environment|}}} |
{{!}}-
{{!}} {{Lang
| en = Environment
| fr = Environnement
}} {{!!}} {{{map-environment|}}}
}}
{{#if: {{{map-setting|}}} |
{{!}}-
{{!}} {{Lang
| en = Setting
| fr = Cadre
}} {{!!}} {{{map-setting|}}}
}}
|}
{{#if: {{{no-category|}}} | |
[[Category:Maps]]
{{#if: {{{game-type|}}} | [[Category:{{{game-type}}} maps]]}}
{{#if: {{{medieval|}}} | [[Category:Medieval maps]]}}
{{#if: {{{four-team|}}} | [[Category:Four-Team maps]] {{#if: {{{game-type|}}} | [[Category:{{{game-type}}} (Four-Team) maps]]}}}}
}} </includeonly>
<noinclude> <templatedata>
{
"params": {
"map-name-override": {
"description": "Title of the map.",
"type": "string"
},
"map-image": {
"description": "In-game image of the map.",
"type": "wiki-file-name",
"suggested": true
},
"game-type": {
"description": "Which gamemode(s) the map is.",
"type": "string",
"suggested": true
},
"four-team": {
"description": "Map is four-team",
"type": "boolean"
},
"medieval": {
"description": "Map is in Medieval mode",
"type": "boolean"
},
"file-name": {
"description": "File name of the map (excluding the extension).",
"type": "string",
"suggested": true
},
"developer": {
"description": "Developer(s) of the map, whether person, company, or project.",
"type": "string",
"suggested": true
},
"link": {
"description": "Link(s) to the map",
"type": "string"
},
"release-date": {
"description": "The date in which the map was released.",
"type": "string",
"suggested": true
},
"map-environment": {
"description": "What environment is the map in.",
"type": "string",
"suggested": true
},
"map-setting": {
"description": "What setting is the map in.",
"type": "string",
"suggested": true
}
},
"description": "Infobox for map pages."
}
</templatedata>
[[Category:Infobox templates]]
</noinclude>

Latest revision as of 02:04, 26 June 2025

Infobox for map pages.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
map-name-overridemap-name-override

Title of the map.

Stringoptional
map-imagemap-image

In-game image of the map.

Filesuggested
game-typegame-type

Which gamemode(s) the map is.

Stringsuggested
four-teamfour-team

Map is four-team

Booleanoptional
medievalmedieval

Map is in Medieval mode

Booleanoptional
file-namefile-name

File name of the map (excluding the extension).

Stringsuggested
developerdeveloper

Developer(s) of the map, whether person, company, or project.

Stringsuggested
linklink

Link(s) to the map

Stringoptional
release-daterelease-date

The date in which the map was released.

Stringsuggested
map-environmentmap-environment

What environment is the map in.

Stringsuggested
map-settingmap-setting

What setting is the map in.

Stringsuggested