टेम्पलेट:HMS
Usage
[संपादन करीं]This is a typing short cut for linking to Royal Navy ship articles named in the format "HMS Gloucester (D96)". Since Ship names are italicized in article text, and editors often don't want to include the pennant number, linking to them in the usual manner means typing everything twice, such as [[HMS Gloucester (D96)|HMS ''Gloucester'']]. This template halves that to {{HMS|Gloucester|D96|6}}.
Basic usage
[संपादन करीं]- {{HMS|Ship Name}}
- {{HMS|Ship Name|ID}}: the optional ID can be the hull number, pennant number or launch year as specified in the article title: [[HMA Ship Name (ID)]].
- {{HMS|Ship Name|ID|6}}: the last code (e.g., "6") sets the formatting of the blue link label.
- Examples
Template usage | Equivalent wikicode | Final result |
---|---|---|
{{HMS|Illustrious|R06}} | [[HMS Illustrious (R06)|HMS ''Illustrious'' (R06)]] | HMS Illustrious (R06) |
{{HMS|Raisonnable|1768}} | [[HMS Raisonnable (1768)|HMS ''Raisonnable'' (1768)]] | HMS Raisonnable (1768) |
{{HMS|Victory}} | [[HMS Victory|HMS ''Victory'']] | HMS Victory |
Last example could be used to link to ship index (disambiguation) page
Format options parameter
[संपादन करीं]A third, unnamed parameter |3=
allows setting which pieces of text are displayed in the wikilink. It sets the label in the link: [[targetpage|label]]
For example, the ship's article is entered as {{HMS|Illustrious|R06}}
, by default showing as HMS Illustrious (R06).
But in your article, the hull number (disambiguator) may not be needed to show. In that case, add |4=2
, and the result is:
{{HMS|Illustrious|R06|2}}
→ Illustrious[[HMS Illustrious (R06)|''Illustrious'']]
The options are:
Value | Displayed | Example | Wikicode | Showing | |
---|---|---|---|---|---|
None | 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 | same as default | {{HMS|Illustrious|R06|4}} | [[HMS Illustrious (R06)|HMS ''Illustrious'' (R06)]] | Invalid Optional Parameter | |
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 |
TemplataData
[संपादन करीं]TemplateData for HMS
परिचय खातिर ऊपर दिहल गइल बिबरनलेख के टेम्पलेट:HMS/doc से ट्रांसक्लूड क के इहाँ देखावल जा रहल बाटे। (संपादन करीं | इतिहास देखीं) संपादक लोग एह टेम्पलेट के अभ्यासपन्ना (सैंडबाक्स) (बनाईं | मिरर करीं) आ टेस्टकेस (बनाईं) पन्ना सभ पर अभ्यास आ प्रयोग (टेस्टिंग) क सकत बाटे। अनुरोध बा कि अगर श्रेणी जोड़े के होखे तब /doc उपपन्ना (सबपेज) पर जोड़ल जाय। एह टेम्पलेट के उपपन्ना (सबपेज) देखीं। |