Template:USV
Usage
[edit]This is a typing short cut for linking to US Navy unmanned vessel articles named in the format "USV Nomad". Since vessel names are italicized in article text, linking to them in the usual manner means typing everything twice. </nowiki>
This template does not support subst:
(substitution). Behind the scenes, it invokes {{vessel}}.
Formal usage
[edit]{{USV|vessel Name}}
{{USV|vessel 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 |
---|---|---|
{{USV|Vesselname|}}
|
[[USV Vesselname ()|USV ''Vesselname'' ()]]
|
USV Vesselname |
Last example could be used to link to vessel index (disambiguation) page
Target page
[edit]By default, the wikilink is build like this:
{{PREFIX|vessel's name|ID}}
.
- With
{{USV|Vesselname|}}
, the targetpage is [[USV Vesselname ()]]
.- Elements PREFIX and ID can be omitted (if they are not part of the targetpage title).
Formatted label
[edit]- Then the template by default adds the formatted label:
[[targetpage|label]]
. By default:{{USV|Vesselname|}}
, by default the label is:[[USV Vesselname ()|USV ''Vesselname'' ()]]
, showing as:- USV Vesselname.
The default label can be changed with a simple parameter. The extra third position, unnamed parameter allows setting which changes the elements of the vessel's full name. 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:
{{USV|Nomad||2}}
→
[[USV Vesselname ()|''Vesselname'']]
→- Vesselname
The options are:
Value | Will show | Example | Wikilink [[targetpage|label]] | Shows |
---|---|---|---|---|
(default) | PREFIX name (ID) | {{USV|Vesselname|}} | [[USV Vesselname ()|USV ''Vesselname'' ()]] | USV Vesselname |
1 | ID | {{USV|Vesselname||1}} | [[USV Vesselname ()|'''']] | Error: {{USV}} missing disambiguator (help) |
2 | name | {{USV|Vesselname||2}} | [[USV Vesselname ()|''Vesselname'']] | Vesselname |
3 | name (ID) | {{USV|Vesselname||3}} | [[USV Vesselname ()|''Vesselname'' ()]] | Error: {{USV}} missing disambiguator (help) |
4 | PREFIX name (ID) | {{USV|Vesselname||4}} | — | Error: {{USV}} invalid control parameter: 4 (help) |
5 | PREFIX ID | {{USV|Vesselname||5}} | [[USV Vesselname ()|USV '''']] | Error: {{USV}} missing disambiguator (help) |
6 | PREFIX name | {{USV|Vesselname||6}} | [[USV Vesselname ()|USV ''Vesselname'']] | USV Vesselname |
- Note: options default (=blank), 2 and 6 are mostly used.
PREFIX not in article name
[edit]It is possible that the prefix is not part of the target pagename. In that case, extra parameter |up=yes
(unlink prefix) puts the name outside of the link: [example here]