Usage
This is a typing short cut for linking to sailing vessel articles named in the format "SY Shipname (Year)". Since ship names are italicized in article text, linking to them in the usual manner means typing everything twice, such as [[SY Shipname (ID)|SY ''Shipname'' (ID)]]. This template halves that to {{SY|Shipname|ID}}.
Formal usage
{{SY|Ship Name}}
{{SY|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 |
---|---|---|
{{SY|Aurora|}}
|
[[SY Aurora|SY ''Aurora'']]
|
SY Aurora |
{{SY|Queen Victoria|ship}}
|
[[SY Queen Victoria (ship)|SY ''Queen Victoria'' (ship)]]
|
SY Queen Victoria (ship) |
{{SY|Princess of Norway}}
|
[[SY Princess of Norway|SY ''Princess of Norway'']]
|
SY Princess of Norway |
Label format options
By default, the wikilink is build like this:
{{SY|Aurora|}}
, the targetpage is
[[SY Aurora]]
.- Then the template by default adds the formatted label:
[[targetpage|label]]
[[SY Aurora|SY ''Aurora'']]
, showing as:- SY Aurora.
The default label can be changed with a simple parameter. The extra third position, unnamed parameter allows setting which elements of the ship's full name are shown in the wikilink. It sets the label in the link:
For example, in your article, the hull number (disambiguator) may not be needed to show. In that case, add option |2
, and the result is:
{{SY|Aurora||2}}
→
[[SY Aurora|''Aurora'']]
→- Aurora
The options are:
Value | Will show | Example | Wikilink [[targetpage|label]] | Shows |
---|---|---|---|---|
(default) | PREFIX name (ID) | {{SY|Aurora|}} | [[SY Aurora|SY ''Aurora'']] | SY Aurora |
2 | name | {{SY|Aurora||2}} | [[SY Aurora|''Aurora'']] | Aurora |
3 | name (ID) | {{SY|Aurora||3}} | [[SY Aurora|''Aurora'']] | Error: {{SY}} missing disambiguator (help) |
4 | invalid | {{SY|Aurora||4}} | — | Error: {{SY}} invalid control parameter: 4 (help) |
6 | PREFIX name | {{SY|Aurora||6}} | [[SY Aurora|SY ''Aurora'']] | SY Aurora |
- Note: options default (=blank), 2 and 6 are most often used.
TemplateData
TemplateData
| |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:SY in articles based on its TemplateData.
TemplateData for SY This template provides a wikilink to a ship's page, with label options
|