• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.154
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:M/S

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
< Template:M
Template documentation[view] [edit] [history] [purge]
Ambox important.svgThis subpage Template:M/S is not related to parent page Template:M. It is located here for technical reasons (having a "/" slash in its title). See parent template {{Ship}} (talk).

Contents

  • 1 Usage
    • 1.1 Formal Usage
    • 1.2 Examples
  • 2 Label format options
  • 3 TemplateData
  • 4 See also

Usage

This template links to an unslashed target page [[ MS Antenor (1957) ]] and shows the slash: M/S Antenor  (1957)

  • To show "MS" (unslashed), use {{MS}}: MS Antenor (1957)
  • When the target pagename has a "/" slash, use {{Ship}}:
Target: [[ S/Y Manitou ]]
Use: {{ship|S/Y|Manitou}} → S/Y Manitou

Formal Usage

  • {{M/S|Ship Name}}
  • {{M/S|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
{{M/S|Antenor|1957}} [[MS Antenor (1957)|M/S ''Antenor'' (1957)]] M/S Antenor  (1957)
{{M/S|Queen Victoria|ship}} [[MS Queen Victoria (ship)|M/S ''Queen Victoria'' (ship)]] M/S Queen Victoria  (ship)
{{M/S|Princess of Norway}} [[MS Princess of Norway|M/S ''Princess of Norway'']] M/S Princess of Norway

Label format options

  • To show "M/S", use {{M/S}}: M/S Antenor  (1957)
  • To link to S/Y Manitou, use {{Ship|S/Y|Manitou}}

By default, the wikilink is build like this:

  • {{M/S|Antenor|1957}}, the targetpage is
[[MS Antenor (1957)]].
Then the template by default adds the formatted label:
[[targetpage|label]]
[[MS Antenor (1957)|M/S ''Antenor'' (1957)]], showing as:
M/S Antenor  (1957).

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:

  • {{MS|Antenor|1957|2}} →
[[MS Antenor (1957)|''Antenor'']] →
Antenor

The options are:

Value Will show Example Wikilink [[targetpage|label]] Shows
(default) PREFIX name (ID) {{M/S|Antenor|1957}} [[MS Antenor (1957)|M/S ''Antenor'' (1957)]] M/S Antenor  (1957)
1 ID {{M/S|Antenor|1957|1}} [[MS Antenor (1957)|''1957'']] 1957
2 name {{M/S|Antenor|1957|2}} [[MS Antenor (1957)|''Antenor'']] Antenor
3 name (ID) {{M/S|Antenor|1957|3}} [[MS Antenor (1957)|''Antenor'' (1957)]] Antenor  (1957)
4 (dflt) PREFIX name (ID) {{M/S|Antenor|1957|4}} [[MS Antenor (1957)|M/S ''Antenor'' (1957)]] M/S Antenor  (1957)
5 PREFIX ID {{M/S|Antenor|1957|5}} [[MS Antenor (1957)|M/S ''1957'']] M/S 1957
6 PREFIX name {{M/S|Antenor|1957|6}} [[MS Antenor (1957)|M/S ''Antenor'']] M/S Antenor
Note: options default (=blank), 2 and 6 are most often used.

TemplateData

This section:
  • view
  • edit
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 M

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

The above documentation is transcluded from Template:M/S/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:M/S&oldid=23239"
Categories:
  • Templates using TemplateData
  • Ship prefix templates
Last edited on 12 May 2020, at 13:41

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 12 May 2020, at 13:41.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop