Template:SMU
Usage
This is a typing short cut for linking to Imperial German Navy or Austro-Hungarian Navy submarine articles named in the format "SM U-28 (Germany)". Since Ship names are italicized in article text, linking to them in the usual manner means typing everything twice, such as [[SM U-28 (Germany)|SM ''U-28'' (Germany)]]. This template shortens that to {{SMU|U-28|Germany}}.
This template uses Template:SMS, which in turn uses Template:Ship, so changes to either of those templates may affect the output of this template
Formal Usage
{{SMU|Ship Name}}{{SMU|Ship Name|disambig}}, wheredisambigis usually either Germany, or Austria-Hungary
Examples
| Template usage | Equivalent wikicode | Final result |
|---|---|---|
{{SMU|U-28|Germany}}
|
[[SM U-28 (Germany)|SM ''U-28'' (Germany)]]
|
Script error: The function "ship_prefix_templates" does not exist. |
{{SMU|U-103}}
|
[[SM U-103|SM ''U-103'']]
|
Script error: The function "ship_prefix_templates" does not exist. |
The last example could be used to link to a ship index (disambiguation) page
Optional display control parameter
There is an optional third parameter that controls which pieces of text are displayed in the article. Its value is treated as a binary number and will display the corresponding "bits". So setting the 4's bit will display SMS, setting the 2's bit will display the ship name, and setting the 1's bit will display the ID. If binary math isn't your thing, refer to these examples:
| Value | Parameter(s) displayed |
Example | Equivalent wikicode | Final result |
|---|---|---|---|---|
| None | all | {{SMU|U-28|Germany}}
|
[[SM U-28 (Germany) |SM ''U-28'' (Germany)]]
|
Script error: The function "ship_prefix_templates" does not exist. |
| 1 | 3rd | {{SMU|U-28|Germany|1}}
|
[[SM U-28 (Germany) |Germany]]
|
Script error: The function "ship_prefix_templates" does not exist. |
| 2 | 2nd | {{SMU|U-28|Germany|2}}
|
[[SM U-28 (Germany) |''U-28'']]
|
Script error: The function "ship_prefix_templates" does not exist. |
| 3 | 2nd, 3rd | {{SMU|U-28|Germany|3}}
|
[[SM U-28 (Germany) |''U-28'' (Germany)]]
|
Script error: The function "ship_prefix_templates" does not exist. |
| 4 | invalid result | {{SMU|U-28|Germany|4}}
|
[[SM U-28 (Germany) |Invalid Optional Parameter]]
|
Script error: The function "ship_prefix_templates" does not exist. |
| 5 | 1st, 3rd | {{SMU|U-28|Germany|5}}
|
[[SM U-28 (Germany) |SM (Germany)]]
|
Script error: The function "ship_prefix_templates" does not exist. |
| 6 | 1st, 2nd | {{SMU|U-28|Germany|6}}
|
[[SM U-28 (Germany) |SM ''U-28'']]
|
Script error: The function "ship_prefix_templates" does not exist. |
| 2nd (no 3rd) |
{{SMU|U-103|3=2}} Alternate usage: {{SMU|U-103||2}}
|
[[SM U-103 |''U-103'']]
|
Script error: The function "ship_prefix_templates" does not exist. |
These are the same optional parameters in use in the other ship shortcut templates. Some of the options above are silly in the case of World War I era U-boats, but are included for compatibility with other shortcut templates.
N.B.: Be careful with the third parameter if not using the second parameter. In the U-103 example above, the "|3=2" means set the third parameter to a value of two, while the alternate syntax shows using a pair of pipes, "||2", to position the value two in the third parameter position.
Using an optional display control parameter value of 6 yields the same results as using {{ship}} to create the same link and text, but usually saving some characters while editing.
{{SMU|U-28|Germany|6}}yields the same results as{{ship|SM|U-28|Germany}}
TemplateData
TemplateData
| |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:SMU in articles based on its TemplateData.
TemplateData for SMU This template provides a wikilink to a ship's page, with label options
| |||||||||||||||||||||||||
See also
| Ship classes | |||
|---|---|---|---|
| Group | Template | Ref article | Example |
| after member ship | {{sclass}} |
article hyphenated | Script error: The function "sclass" does not exist. |
| after theme | {{sclass2}} |
article hyphenated | Script error: The function "sclass" does not exist. |
| General ship prefixes | |||
| Group | Template | Ref article | Example |
| generic | {{ship}} |
any prefix | missing name or missing name |
| civil | {{GTS}} |
Gas turbine ships | missing name |
| civil | {{HSC}} |
High-speed crafts | missing name |
| civil | {{MS}} or {{M/S}} |
Motor ships | missing name or M/S Antenor (1957) |
| civil | {{MV}} or {{M/V}} |
Motor vessels | missing name or M/V Aurora (2000) |
| civil | {{MY}} or {{M/Y}} |
Motor yachts | missing name or M/Y Monte Carlo |
| civil | {{PS}} |
Paddle steamers | missing name |
| civil | {{RMS}} |
Royal Mail Ships | missing name |
| civil | {{RV}} or {{R/V}} |
Research vessels | missing name or R/V Vityaz (1939) |
| civil | {{SB}} |
Sailing barges | missing name |
| civil | {{SS}} or {{S/S}} |
Steamships | Script error: The function "ship_prefix_templates" does not exist. or Template:Ship/alt-label-prefix |
| civil | {{SV}} or {{S/V}} |
Sailing vessels | missing name or S/V Argo (1841) |
| civil | {{SY}} or {{S/Y}} |
Sailing vessels | missing name or S/Y Raven (1889) |
| civil | {{TSS}} |
Twin-screw steamers | missing name |
| International navy ship prefixes | |||
| Group | Template | Ref article | Example |
{{ANS}} |
Algerian National Navy ships | missing name | |
{{HMAS}} |
Royal Australian Navy ships | missing name | |
{{HMBS}} |
Royal Bahamas Defence Force ships | missing name | |
{{BNS}} |
Bangladesh Navy ships | missing name | |
{{HMCS}} |
Royal Canadian Navy ships | missing name | |
{{CCGS}} |
Canadian Coast Guard ships | missing name | |
{{ARC}} |
Colombian Navy ships | missing name | |
{{HDMS}} |
Royal Danish Navy ships | missing name | |
{{BAE}} |
Ecuadorian Navy ships | missing name | |
{{ENS}} |
Egyptian Navy ships | missing name | |
{{EML}} |
Estonian Navy ships | missing name | |
{{RFNS}} |
Republic of Fiji Naval Service ships | missing name | |
{{FNS}} |
Finnish Navy ships | missing name | |
{{HS}} |
Hellenic Navy ships | missing name | |
{{SMS}} |
Imperial German Navy and Austro-Hungarian Navy ships | Script error: The function "ship_prefix_templates" does not exist. | |
{{SMU}} |
Imperial German Navy and Austro-Hungarian Navy U-boats | Script error: The function "ship_prefix_templates" does not exist. | |
{{GS}} |
German World War II and later U-boats | missing name | |
{{ICGV}} |
Icelandic Coast Guard ships | missing name | |
{{INS}} |
Indian Navy ships | Script error: The function "ship_prefix_templates" does not exist. | |
{{KRI}} |
Indonesian Navy ships | missing name | |
{{LÉ}} |
Irish Navy ships | missing name | |
{{Jsub}} |
Imperial Japanese Navy submarines | missing name | |
{{JDS}} |
Older Japan Maritime Self-Defense Force ships | missing name | |
{{JS}} |
Newer Japan Maritime Self-Defense Force ships | missing name | |
{{HNLMS}} |
Royal Netherlands Navy ships | Script error: The function "ship_prefix_templates" does not exist. | |
{{HMNZS}} |
Royal New Zealand Navy ships | missing name | |
{{NNS}} |
Nigerian Navy ships | missing name | |
{{HNoMS}} |
Royal Norwegian Navy ships | Script error: The function "ship_prefix_templates" does not exist. | |
{{HMPNGS}} |
Papua New Guinean Navy ships | missing name | |
{{BAP}} |
Peruvian Navy ships | missing name | |
{{RPS}} |
Older Philippine Navy ships | missing name | |
{{BRP}} |
Newer Philippine Navy ships | missing name | |
{{ORP}} |
Polish Navy ships | missing name | |
{{NRP}} |
Portuguese Navy ships | missing name | |
{{NMS}} |
Romanian Navy ships | missing name | |
{{RSS}} |
Republic of Singapore Navy ships | missing name | |
{{SAS}} |
South African Navy ships after 31 May 1961 | missing name | |
{{HMSAS}} |
Union of South Africa Navy (before 30 May 1961) | missing name | |
{{ROKS}} |
Republic of Korea Navy ships | missing name | |
{{HSwMS}} |
Swedish Navy ships | Script error: The function "ship_prefix_templates" does not exist. | |
{{HTMS}} |
Royal Thai Navy ships | missing name | |
{{TCG}} |
Turkish Naval Forces ships | missing name | |
{{HMS}} |
Royal Navy ships | Script error: The function "ship_prefix_templates" does not exist. | |
{{HMT}} |
Royal Navy trawlers | HMT Elk (1902) | |
{{RFAux}} |
Royal Fleet Auxiliary ships | missing name | |
{{USAT}} |
US Army transport ships | missing name | |
{{USCGC}} |
US Coast Guard Cutter | missing name | |
{{USNS}} |
US Naval Ship | missing name | |
{{USRC}} |
US Revenue Cutter Service | missing name | |
{{USS}} |
US Navy ship | missing name | |
{{USAV}} |
US Army Vessel | missing name | |