Template:INS/doc

From MOASSpedia
Jump to navigation Jump to search

This is a typing short cut for linking to Indian Navy ship articles named in the format "INS Mahé (M-83)". Since ship names are italicized in article text, linking to them in the usual manner means typing everything twice, such as [[INS Mahé (M-83)|INS ''Mahé'' (M-83)]]. This template halves that to {{INS|Mahé|M-83}}.

Formal usage

  • {{INS|Ship Name}}
  • {{INS|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
{{INS|Mahé|M 83}} [[INS Mahé (M 83)|INS ''Mahé'' (M 83)]] INS Mahé (M 83)
{{INS|Mahé|1983}} [[INS Mahé (1983)|INS ''Mahé'' (1983)]] INS Mahé (1983)
{{INS|Mahé}} [[INS Mahé|INS ''Mahé'']] INS Mahé

Last example could be used to link to ship index (disambiguation) page

Usage

This section:

Basically, the template takes up to three parameters to write the target page, and to format the label shown. General setup is:

[[targetpage|label]]
[[HMS Illustrious (R06)|HMS Illustrious (R06)]].

Target page

By default, the wikilink is build like this:

  • {{PREFIX|ship's name|ID}}.
With {{HMS|Illustrious|R06}}, the targetpage is
[[HMS Illustrious (R06)]].
Elements PREFIX and ID can be omitted (if they are not part of the targetpage title).

Formatted label

Then the template by default adds the formatted label:
[[targetpage|label]]
{{HMS|Illustrious|R06}}
[[HMS Illustrious (R06)|HMS ''Illustrious'' (R06)]], showing as:
HMS Illustrious (R06).

The default label can be changed with a simple parameter. The extra third position, unnamed parameter allows setting which changes the elements of the ship'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:

  • {{HMS|Illustrious|R06|2}}
[[HMS Illustrious (R06)|''Illustrious'']]
Illustrious

The options are:

Value Will show Example Wikilink [[targetpage|label]] Shows
(default) PREFIX name (ID) {{HMS|Illustrious|R06}} [[HMS Illustrious (R06)|HMS ''Illustrious'' (R06)]] HMS Illustrious (R06)
1 ID {{HMS|Illustrious|R06|1}} [[HMS Illustrious (R06)|R06]] R06
2 name {{HMS|Illustrious|R06|2}} [[HMS Illustrious (R06)|''Illustrious'']] Illustrious
3 name (ID) {{HMS|Illustrious|R06|3}} [[HMS Illustrious (R06)|''Illustrious'' (R06)]] Illustrious (R06)
4 (dflt) PREFIX name (ID) {{HMS|Illustrious|R06|4}} [[HMS Illustrious (R06)|HMS ''Illustrious'' (R06)]] HMS Illustrious (R06)
5 PREFIX ID {{HMS|Illustrious|R06|5}} [[HMS Illustrious (R06)|HMS ''R06'']] HMS R06
6 PREFIX name {{HMS|Illustrious|R06|6}} [[HMS Illustrious (R06)|HMS ''Illustrious'']] HMS Illustrious
Note: options default (=blank), 2 and 6 are mostly used.

TemplateData

This section:
TemplateData
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. Click here to see a monthly parameter usage report for this template based on this TemplateData.

TemplateData for INS

This template provides a wikilink to a ship's page, with label options

Template parameters

ParameterDescriptionTypeStatus
Name1

Ship's name

Example
Bismarck, Belgrano
Stringoptional
ID2

Hull number, launch year, or pennant number

Example
H75, 1975
Stringoptional
Format3

Formats the label (which name parts will show)

Default
blank
Example
1, 2, 3, 5, 6
Numberoptional
unlink prefixup

up=yes puts prefix before (outside of) the wikilink

Default
no
Example
up=yes
Booleanoptional

See also

Template:WPSHIPS shortcut templates