Template:USRC/doc
| This is a documentation subpage for Template:USRC It may contain usage information, categories and other content that is not part of the original template page. |
Usage
This is a typing short cut for linking to U.S. Revenue Cutter Service cutter articles named in the format "USRC Cutter (year)". Since ship names are italicized in article text, linking to them in the usual manner means typing everything twice, such as [[USRC Cutter (year)|USRC ''Cutter'' (year)]]. This template halves that to {{USRC|Cutter|year}}.
Formal Usage
- {{USRC|Ship Name}}
- {{USRC|Ship Name|ID}}, where ID can be the hull number, launch year, or pennant number, as specified in the article title.
Examples
| Template usage | Equivalent wikicode | Final result |
|---|---|---|
| {{USRC|Harriet Lane|1857}} | [[USRC Harriet Lane (1857)|USRC ''Harriet Lane'' (1857)]] | missing name |
| {{USRC|Bear}} | [[USRC Bear|USRC ''Bear'']] | missing name |
Last example could be used to link to 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 USRC, 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 | {{USRC|Harriet Lane|1857}} | [[USRC Harriet Lane (1857)|USRC ''Harriet Lane'' (1857)]] | missing name | |
| 1 | 3rd | {{USRC|Harriet Lane|1857|1}} | [[USRC Harriet Lane (1857)|1857]] | missing name | |
| 2 | 2nd | {{USRC|Harriet Lane|1857|2}} | [[USRC Harriet Lane (1857)|''Harriet Lane'']] | missing name | |
| 3 | 2nd, 3rd | {{USRC|Harriet Lane|1857|3}} | [[USRC Harriet Lane (1857)|''Harriet Lane'' (1857)]] | missing name | |
| 4 | invalid result | {{USRC|Harriet Lane|1857|4}} | [[USRC Harriet Lane (1857)|Invalid Optional Parameter]] | missing name | |
| 5 | 1st, 3rd | {{USRC|Harriet Lane|1857|5}} | [[USRC Harriet Lane (1857)|USRC (1857)]] | missing name | |
| 6 | 1st, 2nd | {{USRC|Harriet Lane|1857|6}} | [[USRC Harriet Lane (1857)|USRC ''Harriet Lane'']] | missing name | |
| 2nd (no 3rd) |
{{USRC| Bear|3=2}} | Alternate usage: {{USRC|Bear||2}} | [[USRC Bear|''Bear'']] | missing name | |
N.B.: Be careful with the third parameter if not using the second parameter. In the Matagorda 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 {{warship}} to create the same link and text, but saving, coincidentally, 6 characters while editing.
{{USRC|Harriet Lane|1857|6}} yields the same results as {{warship|USRC|Harriet Lane|1857}}
TemplateData
TemplateData
| |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:USRC in articles based on its TemplateData.
TemplateData for USRC 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 | |