Template:SS/doc
| This is a documentation subpage for Template:SS. It may contain usage information, categories and other content that is not part of the original template page. |
| This template is used on approximately 22,000 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
[edit]This is a typing shortcut for linking to steamship articles named in the format "SS Shipname (Year)". Since ship names are italicized in article text, linking to them in the usual manner means typing everything twice, such as [[SS Shipname (Year)|SS ''Shipname'' (Year)]]. This template halves that to {{SS|Shipname|Year}}.
SS is the abbreviation for screw steamer, not steam-powered ship. It is almost never written out.
Formal usage
[edit]{{SS|Ship Name}}{{SS|Ship Name|ID}}, where ID can be the hull number, launch year, or pennant number, as specified in the article title.
Examples
[edit]| Template usage | Equivalent wikicode | Final result |
|---|---|---|
{{SS|Brazil|1928}} |
[[SS Brazil (1928)|SS ''Brazil'' (1928)]] |
SS Brazil (1928) |
{{SS|Pierre Victory}} |
[[SS Pierre Victory|SS ''Pierre Victory'']] |
SS Pierre Victory |
Last example could be used to link to ship index (disambiguation) page
Optional display control parameter
[edit]There is an optional third parameter that controls which pieces of text are displayed in the wikilink to the article. Its value is essentially treated as a binary number and will display some or all of the fields. The three fields are: SS, ship name, and ID. So, setting the 4's bit will display SS, setting the 2's bit will display the ship name (in italics), and setting the 1's bit will display the ID. Not all combinations are considered valid, and all fields are displayed when the parameter is omitted. Examples:
| Value | Binary | Field(s) displayed |
Example | Equivalent wikicode | Final result |
|---|---|---|---|---|---|
| None | N/A | 1st, 2nd, 3rd | {{SS|Brazil|1928}} |
[[SS Brazil (1928)|SS ''Brazil'' (1928)]] |
SS Brazil (1928) |
| 0 | 000 | invalid result | {{SS|Brazil|1928|0}} |
not applicable (would display nothing) | Error: {{SS}} invalid control parameter: 0 (help) |
| 1 | 001 | 3rd | {{SS|Brazil|1928|1}} |
[[SS Brazil (1928)|1928]] |
1928 |
| 2 | 010 | 2nd | {{SS|Brazil|1928|2}} |
[[SS Brazil (1928)|''Brazil'']] |
Brazil |
| 3 | 011 | 2nd, 3rd | {{SS|Brazil|1928|3}} |
[[SS Brazil (1928)|''Brazil'' (1928)]] |
Brazil (1928) |
| 4 | 100 | invalid result | {{SS|Brazil|1928|4}} |
not applicable (would only display SS) | Error: {{SS}} invalid control parameter: 4 (help) |
| 5 | 101 | 1st, 3rd | {{SS|Brazil|1928|5}} |
[[SS Brazil (1928)|SS ''1928'']] |
SS 1928 |
| 6 | 110 | 1st, 2nd | {{SS|Brazil|1928|6}} |
[[SS Brazil (1928)|SS ''Brazil'']] |
SS Brazil |
| 7 | 111 | invalid result | {{SS|Brazil|1928|7}} |
not applicable (omit the parameter, see None) | Error: {{SS}} invalid control parameter: 7 (help) |
Note that omitting the control parameter yields the same results as using {{warship}} to create the same link and text, but saves characters while editing:
{{SS|Brazil|1928}}yields SS Brazil (1928){{warship|SS|Brazil|1928}}yields SS Brazil (1928)
Use of third parameter without second parameter
[edit]Be careful with the third parameter when not using the second parameter. For example, for articles such as SS Pierre Victory there is no ID field. To only display Pierre Victory, you can use one of the following:
{{SS|Pierre Victory||2}}yields Pierre Victory{{SS|Pierre Victory|3=2}}yields Pierre Victory
In the first example, the consecutive pipes, || indicates a null ID field and 2 is the control parameter.
In the second example, the |3=2 means "set the third parameter to a value of two".
TemplateData
[edit]TemplateData | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:SS in articles based on its TemplateData.
TemplateData for SS This template provides a wikilink to a ship's page, with label options
| |||||||||||||||||||||||||