Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Ship/doc: Difference between revisions

Template page
Adam Cion (talk | contribs)
Add an example of inline behavior (test case for any fix and to warn users)
m Add dependencies.
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>{{main|Template:Ship}}</noinclude>
; Description
Using this template, you can embed any ship information available in our wiki to any other articles. If you want to browse through the currently available ship list, please visit this page [[:Category:Ship Database|Ship Database]].
: Using this template, you can embed any ship information available in our wiki to any other article. If you want to browse through the currently available ship list, please visit the [[:Category:Ship Database|Ship Database]] category or use the [[:Template:ShipsMatrix|ships matrix]].
==Usage Guide==
===The Syntax===
<pre><nowiki>{{Ship | <ship name> | <tooltip/box> }}</nowiki></pre>


;ship name
; Dependencies
:Use the exact name of the ship, as listed in the database (the names are case-sensitive)
:; Uses:
:: {{T|ShipBoxTooltip}}
:: {{T|ShipBoxLarge}}


;tooltip/box
; Syntax
:Use <code>tooltip</code> to display a small tooltip, or <code>box</code> for a large box of information.  
: {{T|Ship|ship name|mode}}
:; Parameters
::; ship name
::: The name of the ship, exactly as used in the [[:Category:Ship Database|Ship Database]] articles.
::; mode
::: This parameter controls whether a link with a ship information tool-tip (<nowiki>{{ShipBoxTooltip}}</nowiki>) or a box (<nowiki>{{ShipBoxLarge}}</nowiki> with the ship information is shown. The possible options are '''box''' which creates the box or '''tooltip''' which creates the link with the tool-tip. when no mode is given the template defaults to tooltip.


=== Examples ===
; Samples
: {{Code|This is an example <nowiki>{{Ship|Raven Navy Issue}}</nowiki> of a link with tool-tip.}} gives ...
: This is an example {{Ship|Raven Navy Issue}} of a link with tool-tip.


:<code><nowiki>{{Ship|Redeemer|box}}</nowiki></code> gives:


{{Ship|Redeemer|box}}
{{Bug|20220501: There is a problem with the link displaying as a box instead of as an inline element.<br>
See [[Template talk:ShipBoxTooltip]]<br>
Observation: When the doc page is transcluded into the template page the problem goes away.}}


:<code><nowiki>{{Ship|Redeemer|tooltip}}</nowiki></code> gives (mouse over the link to see the information box):


{{Ship|Redeemer|tooltip}}
: {{Code|<nowiki>{{Ship|Redeemer|box}}</nowiki>}} gives ...
 
{{Ship|Redeemer|box}}
:<code><nowiki>An inline {{Ship|Redeemer|tooltip}} example.</nowiki></code> gives (mouse over the link to see the information box):
 
An inline {{Ship|Redeemer|tooltip}} example.


<includeonly>[[Category:Template]]</includeonly>
<includeonly>[[Category:Formatting templates]]</includeonly>
<noinclude>[[Category:Template documentation]]</noinclude>
<noinclude>[[Category:Template documentation]]</noinclude>