Difference between revisions of "Template:JS/doc"
imported>Swpb m (→See also: clean up using AWB) |
imported>Jonesey95 |
||
| (One intermediate revision by one other user not shown) | |||
| Line 7: | Line 7: | ||
=== Formal usage === | === Formal usage === | ||
| − | * < | + | * <code><nowiki>{{JS|Ship Name}}</nowiki></code> |
| − | * < | + | * <code><nowiki>{{JS|Ship Name|ID}}</nowiki></code>, where ID can be the [[hull number]], launch year, or [[pennant number]], as specified in the article title. |
=== Example === | === Example === | ||
| Line 17: | Line 17: | ||
! Final result | ! Final result | ||
|- | |- | ||
| − | | < | + | | <code><nowiki>{{JDS|Ashigara|DDG-178}}</nowiki></code> |
| − | | < | + | | <code><nowiki>[[JDS Ashigara (DDG-178)|JDS ''Ashigara'' (DDG-178)]]</nowiki></code> |
| {{JDS|Wakaba|DE-261}} | | {{JDS|Wakaba|DE-261}} | ||
|} | |} | ||
| Line 26: | Line 26: | ||
{|class=wikitable width=100% | {|class=wikitable width=100% | ||
! Value | ! Value | ||
| − | ! Parameter(s)<br>displayed | + | ! Parameter(s)<br />displayed |
! Example | ! Example | ||
! Equivalent wikicode | ! Equivalent wikicode | ||
| Line 33: | Line 33: | ||
! None | ! None | ||
| style="text-align:center;" | all | | style="text-align:center;" | all | ||
| − | | < | + | | <code><nowiki>{{JS|Ashigara|DDG-178}}</nowiki></code> |
| − | | < | + | | <code><nowiki>[[JS Ashigara (DDG-178)|JS ''Ashigara'' (DDG-178)]]</nowiki></code> |
| {{JS|Ashigara|DDG-178}} | | {{JS|Ashigara|DDG-178}} | ||
|- | |- | ||
! 1 | ! 1 | ||
| style="text-align:center;" | 3rd | | style="text-align:center;" | 3rd | ||
| − | | < | + | | <code><nowiki>{{JS|Ashigara|DDG-178|1}}</nowiki></code> |
| − | | < | + | | <code><nowiki>[[JS Ashigara (DDG-178)|DDG-178]]</nowiki></code> |
| {{JS|Ashigara|DDG-178|1}} | | {{JS|Ashigara|DDG-178|1}} | ||
|- | |- | ||
! 2 | ! 2 | ||
| style="text-align:center;" | 2nd | | style="text-align:center;" | 2nd | ||
| − | | < | + | | <code><nowiki>{{JS|Ashigara|DDG-178|2}</nowiki>}</code> |
| − | | < | + | | <code><nowiki>[[JS Ashigara (DDG-178)|''Ashigara'']]</nowiki></code> |
| {{JS|Ashigara|DDG-178|2}} | | {{JS|Ashigara|DDG-178|2}} | ||
|- | |- | ||
! 3 | ! 3 | ||
| style="text-align:center;" | 2nd, 3rd | | style="text-align:center;" | 2nd, 3rd | ||
| − | | < | + | | <code><nowiki>{{JS|Ashigara|DDG-178|3}</nowiki>}</code> |
| − | | < | + | | <code><nowiki>[[JS Ashigara (DDG-178)|''Ashigara'' (DDG-178)]]</nowiki></code> |
| {{JS|Ashigara|DDG-178|3}} | | {{JS|Ashigara|DDG-178|3}} | ||
|- | |- | ||
! 4 | ! 4 | ||
| style="text-align:center;" | invalid result | | style="text-align:center;" | invalid result | ||
| − | | < | + | | <code><nowiki>{{JS|Ashigara|DDG-178|4}</nowiki>}</code> |
| − | | < | + | | <code><nowiki>[[JS Ashigara (DDG-178)|Invalid Optional Parameter]]</nowiki></code> |
| {{JS|Ashigara|DDG-178|4}} | | {{JS|Ashigara|DDG-178|4}} | ||
|- | |- | ||
! 5 | ! 5 | ||
| style="text-align:center;" | 1st, 3rd | | style="text-align:center;" | 1st, 3rd | ||
| − | | < | + | | <code><nowiki>{{JS|Ashigara|DDG-178|5}</nowiki>}</code> |
| − | | < | + | | <code><nowiki>[[JS Ashigara (DDG-178)|JS (DDG-178)]]</nowiki></code> |
| {{JS|Ashigara|DDG-178|5}} | | {{JS|Ashigara|DDG-178|5}} | ||
|- | |- | ||
! 6 | ! 6 | ||
| style="text-align:center;" | 1st, 2nd | | style="text-align:center;" | 1st, 2nd | ||
| − | | < | + | | <code><nowiki>{{JS|Ashigara|DDG-178|6}</nowiki>}</code> |
| − | | < | + | | <code><nowiki>[[JS Ashigara (DDG-178)|JS ''Ashigara'']]</nowiki></code> |
| {{JS|Ashigara|DDG-178|6}} | | {{JS|Ashigara|DDG-178|6}} | ||
|} | |} | ||
| − | == | + | |
| − | {{ | + | == TemplateData == |
| − | + | {{Template:Ship/doc/fixed prefix: TemplateData}} | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | } | ||
| − | |||
== See also == | == See also == | ||
Latest revision as of 02:23, 3 June 2020
| This is a documentation subpage for Template:JS. It contains usage information, categories and other content that is not part of the original template page. |
Contents
Usage
This is a typing short cut for linking to modern Japan Maritime Self-Defense Force ship articles named in the format "JS Deep Six (AWOL-99)". Since ship names are italicized in article text, linking to them in the usual manner means typing everything twice, such as [[JS Deep Six (AWOL-99)|JS ''Deep Six'' (AWOL-99)]]. This template halves that to {{JDS|Deep Six|AWOL-99}}.
Formal usage
{{JS|Ship Name}}{{JS|Ship Name|ID}}, where ID can be the hull number, launch year, or pennant number, as specified in the article title.
Example
| Template usage | Equivalent wikicode | Final result |
|---|---|---|
{{JDS|Ashigara|DDG-178}}
|
[[JDS Ashigara (DDG-178)|JDS ''Ashigara'' (DDG-178)]]
|
JDS Wakaba (DE-261) |
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 | {{JS|Ashigara|DDG-178}}
|
[[JS Ashigara (DDG-178)|JS ''Ashigara'' (DDG-178)]]
|
JS Ashigara (DDG-178) |
| 1 | 3rd | {{JS|Ashigara|DDG-178|1}}
|
[[JS Ashigara (DDG-178)|DDG-178]]
|
DDG-178 |
| 2 | 2nd | {{JS|Ashigara|DDG-178|2}}
|
[[JS Ashigara (DDG-178)|''Ashigara'']]
|
Ashigara |
| 3 | 2nd, 3rd | {{JS|Ashigara|DDG-178|3}}
|
[[JS Ashigara (DDG-178)|''Ashigara'' (DDG-178)]]
|
Ashigara (DDG-178) |
| 4 | invalid result | {{JS|Ashigara|DDG-178|4}}
|
[[JS Ashigara (DDG-178)|Invalid Optional Parameter]]
|
JS Ashigara (DDG-178) |
| 5 | 1st, 3rd | {{JS|Ashigara|DDG-178|5}}
|
[[JS Ashigara (DDG-178)|JS (DDG-178)]]
|
JS DDG-178 |
| 6 | 1st, 2nd | {{JS|Ashigara|DDG-178|6}}
|
[[JS Ashigara (DDG-178)|JS ''Ashigara'']]
|
JS Ashigara |
TemplateData
Template:Ship/doc/fixed prefix: TemplateData
See also
Template:WPSHIPS shortcut templates