Template:Infobox service record: Difference between revisions
Appearance
wiki>Zackmann08 Adding unknown parameter tracking through Category:Pages using infobox service record with unknown parameters using AddCheckForUnknownParameters and Module:check for unknown parameters |
Add Era field to infobox template |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<templatestyles src="Template:Infobox service record/styles.css" /> | |||
<includeonly>{{#switch:{{#ifeq:{{{is_ship|}}}|yes|1|0}}{{#ifeq:{{{is_multi|}}}|yes|1|0}}| | <includeonly>{{#switch:{{#ifeq:{{{is_ship|}}}|yes|1|0}}{{#ifeq:{{{is_multi|}}}|yes|1|0}}| | ||
|00 = <table {{WPMILHIST Infobox style|main_box}}><!-- standalone --> | |00 = <table {{WPMILHIST Infobox style|main_box}}><!-- standalone --> | ||
| Line 32: | Line 33: | ||
}}{{#if:{{{awards|}}}|<tr><th style="padding-right: 1em;">Awards</th><td> | }}{{#if:{{{awards|}}}|<tr><th style="padding-right: 1em;">Awards</th><td> | ||
{{{awards}}}</td></tr> | {{{awards}}}</td></tr> | ||
}}}}{{#switch:{{#ifeq:{{{is_ship|}}}|yes|1|0}}{{#ifeq:{{{is_multi|}}}|yes|1|0}}| | }}}}{{#if:{{{era|}}}|<tr><th style="padding-right: 1em;">Era</th><td>{{{era}}}</td></tr> | ||
{{#switch:{{#ifeq:{{{is_ship|}}}|yes|1|0}}{{#ifeq:{{{is_multi|}}}|yes|1|0}}| | |||
|00 = </table> | |00 = </table> | ||
|#default = }}</includeonly>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox service record with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox service record]] with unknown parameter "_VALUE_"|ignoreblank=y| awards | codes | commanders | is_multi | is_ship | label | operations | partof | victories }}<noinclude> | |#default = }}</includeonly>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox service record with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox service record]] with unknown parameter "_VALUE_"|ignoreblank=y| awards | codes | commanders | is_multi | is_ship | label | operations | partof | victories | era }}<noinclude> | ||
{{convert to use Infobox}} | {{convert to use Infobox}} | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Latest revision as of 00:07, 11 July 2026
Template:Convert to use Infobox
File:Test Template Info-Icon - Version (2).svg Template documentationviewedithistorypurge
| Warning | This template is used on many pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
Usage
Infobox service record
[edit source]| Combat service | |
|---|---|
| Part of | 7. Unterseebootsflottille (1938–41) |
| Identification codes | M 18 837 (feldpost) |
| Commanders | Günther Prien (1938–41) |
| Operations | 10 patrols |
| Victories |
30 ships (162,769 GRT) sunk, 1 warship (29,150 tons) sunk, 8 ships (62,751 GRT) damaged |
| Era | {{{era}}} |
The box should be added using the {{Infobox service record}} template, as shown below:
<syntaxhighlight lang="wikitext" style="overflow:auto; margin:0.5em">
{{#if:|
</syntaxhighlight>
| Service record | |
|---|---|
| Era | {{{era}}} |
- is_ship – optional – "yes" if the box is being used inside a compound ship infobox.
- is_multi – optional – "yes" if multiple instances of the box are being used inside a single compound ship infobox.
- label – optional – the label to use for the box; this defaults to "Service record" if left blank.
- partof – optional – the unit or formation of which the subject unit or ship was a part; multiple units may be listed with the corresponding dates.
- codes – optional – the identification codes carried by the unit or ship; these should generally be labeled according to what the code indicates.
- commanders – optional – the notable commanding officers for the period covered.
- operations – optional – the operations (such as battles, wars, campaigns, patrols, cruises, etc.) in which the subject unit or ship participated; these may be given as a list, or described in a more condensed form.
- victories – optional – the victories or successes in the subject's service history. For units, this may be battles won; for submarines or merchant raiders, the ships and tonnage sunk; and so forth.
- awards – optional – the awards, decorations, or other honors received by the subject unit or ship.