Template:ICGV/doc
< Template:ICGV
Jump to navigation
Jump to search
Revision as of 19:04, 22 October 2016 by imported>隐世高人 (→Optional display control parameter)
| This is a documentation subpage for Template:ICGV. It contains 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 Icelandic Coast Guard ship articles named in the format "ICGV Óðinn". Since ship names are italicized in article text, linking to them in the usual manner means typing everything twice, such as [[ICGV Óðinn|ICGV ''Óðinn'']]. This template halves that to {{ICGV|Óðinn}}.
Formal usage
- {{ICGV|Ship Name}}
Example
| Template usage | Equivalent wikicode | Final result |
|---|---|---|
| {{ICGV|Óðinn}} | [[ICGV Óðinn|ICGV ''Óðinn'']] | ICGV Óðinn |
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 BRP, 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 | {{ICGV|Óðinn}} | [[ICGV Óðinn|ICGV ''Óðinn'']] | ICGV Óðinn |
| 1 | 2nd | {{ICGV|Óðinn}} | [[ICGV Óðinn|Óðinn]] | ICGV Óðinn (1) |
See also
Template:WPSHIPS shortcut templates