Template:SRV infobox: Difference between revisions
Create reusable SRV infobox |
Make SRV infobox data-backed |
||
| Line 1: | Line 1: | ||
{{ | {{#invoke:SRVs|infobox}}<noinclude> | ||
}}<noinclude> | |||
== Usage == | == Usage == | ||
Infobox for [[Surface Recon Vehicles|Surface Recon Vehicle]] articles. | |||
<pre> | The template is wired to structured SRV data in [[Module:Data/SRVs/index|Module:Data/SRVs/index]] and individual records at <code>Module:Data/SRVs/<Page name></code>. Normal article usage should be the same data-backed pattern used by Engineer pages: | ||
{{SRV infobox | |||
<pre>{{SRV infobox}}</pre> | |||
The template automatically uses the current page title and structured defaults. Article-level parameters remain available as an escape hatch, but should not be left as manual boilerplate on SRV articles. | |||
Empty or unknown values are hidden automatically. | |||
<templatedata> | |||
{ | |||
"description": "Data-backed infobox for Surface Recon Vehicle articles. Article parameters override structured SRV data defaults only when needed.", | |||
}} | "format": "block", | ||
</ | "params": { | ||
"name": { "label": "Name", "description": "SRV display name. Defaults to structured data or the page title.", "type": "string" }, | |||
"image": { "label": "Image", "description": "Image filename, without the File: prefix. Defaults to structured data.", "type": "wiki-file-name" }, | |||
"manufacturer": { "label": "Manufacturer", "type": "string" }, | |||
"vehicle_type": { "label": "Vehicle type", "type": "string" }, | |||
"primary_role": { "label": "Primary role", "type": "string" }, | |||
"crew": { "label": "Crew", "type": "string" }, | |||
"hangar": { "label": "Hangar requirement", "type": "string" }, | |||
"release": { "label": "Release", "type": "string" }, | |||
"availability": { "label": "Availability", "type": "string" }, | |||
"mass": { "label": "Mass", "type": "string" }, | |||
"hull": { "label": "Hull", "type": "string" }, | |||
"shields": { "label": "Shields", "type": "string" }, | |||
"speed": { "label": "Speed", "type": "string" }, | |||
"boost_speed": { "label": "Boost speed", "type": "string" }, | |||
"cargo": { "label": "Cargo", "type": "string" }, | |||
"weapons": { "label": "Weapons", "type": "string" }, | |||
"utility_equipment": { "label": "Utility equipment", "type": "string" } | |||
}, | |||
"paramOrder": [ | |||
"name", | |||
"image", | |||
"manufacturer", | |||
"vehicle_type", | |||
"primary_role", | |||
"crew", | |||
"hangar", | |||
"release", | |||
"availability", | |||
"mass", | |||
"hull", | |||
"shields", | |||
"speed", | |||
"boost_speed", | |||
"cargo", | |||
"weapons", | |||
"utility_equipment" | |||
] | |||
} | |||
</templatedata> | |||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> | ||
Latest revision as of 13:33, 29 August 2026
Usage
Infobox for Surface Recon Vehicle articles.
The template is wired to structured SRV data in Module:Data/SRVs/index and individual records at Module:Data/SRVs/<Page name>. Normal article usage should be the same data-backed pattern used by Engineer pages:
{{SRV infobox}}
The template automatically uses the current page title and structured defaults. Article-level parameters remain available as an escape hatch, but should not be left as manual boilerplate on SRV articles.
Empty or unknown values are hidden automatically.
Data-backed infobox for Surface Recon Vehicle articles. Article parameters override structured SRV data defaults only when needed.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Name | name | SRV display name. Defaults to structured data or the page title. | String | optional |
| Image | image | Image filename, without the File: prefix. Defaults to structured data. | File | optional |
| Manufacturer | manufacturer | no description | String | optional |
| Vehicle type | vehicle_type | no description | String | optional |
| Primary role | primary_role | no description | String | optional |
| Crew | crew | no description | String | optional |
| Hangar requirement | hangar | no description | String | optional |
| Release | release | no description | String | optional |
| Availability | availability | no description | String | optional |
| Mass | mass | no description | String | optional |
| Hull | hull | no description | String | optional |
| Shields | shields | no description | String | optional |
| Speed | speed | no description | String | optional |
| Boost speed | boost_speed | no description | String | optional |
| Cargo | cargo | no description | String | optional |
| Weapons | weapons | no description | String | optional |
| Utility equipment | utility_equipment | no description | String | optional |