Difference between pages "Template:Infobox ship begin" and "Template:Infobox ship begin/sandbox"

(Difference between pages)
Jump to: navigation, search
Page 1
Page 2
m (1 revision)
 
m (1 revision)
 
Line 17: Line 17:
 
|1211={{Italics after | {{str left| {{PAGENAME}} | {{#expr:{{str find|{{PAGENAME}} |(}}-1}} }} <!-- end str left --> | {{Ship prefix | {{PAGENAME}} }} }}
 
|1211={{Italics after | {{str left| {{PAGENAME}} | {{#expr:{{str find|{{PAGENAME}} |(}}-1}} }} <!-- end str left --> | {{Ship prefix | {{PAGENAME}} }} }}
 
|#default=
 
|#default=
}}<!-- end switch --></includeonly><noinclude>{{documentation}}</noinclude>
+
}}<!-- end switch --></includeonly><noinclude><!-- {{documentation}} -->
 +
 
 +
Ship article infoboxes are tables that contain several infoboxes – {{tld|Infobox ship begin}}, {{tlx|Infobox ship image}}, {{tlx|Infobox ship career}}, {{tlx|Infobox ship characteristics}}.  This version of {{tld|Infobox ship begin/sandbox}} puts a table caption at the top of the infobox.  The purpose of that is for accessibility - so those with screen readers can more easily navigate the ship article.
 +
 
 +
To accomplish this, {{tld|Infobox ship begin/sandbox}} introduces a new parameter {{para|infobox caption}}.
 +
 
 +
When {{para|infobox caption}} is omitted or present but empty, the template acts as it did previously: the ship article infobox does not have a caption.
 +
 
 +
When the parameter reads {{para|infobox caption|yes}} or {{para|infobox caption|nodab}}, the template uses the article title.
 +
 
 +
:{{para|infobox caption|yes}} formats the infobox caption in the same way that the article title is formatted.
 +
 
 +
:{{para|infobox caption|nodab}} formats the infobox caption in the same way except that the parenthetical disambiguator is not displayed.
 +
 
 +
When {{para|infobox caption}} is present and has an assigned value other than the keywords <code>yes</code> or <code>nodab</code>, that value is used as the infobox caption. Infobox caption text formatting is the responsibility of the editor.
 +
 
 +
The formatting uses code derived from that which the ship article infobox uses to format the article title – the code started with the code in {{tlx|italic title prefixed}}. For this reason, the same constraints apply.  If an article title currently requires {{tlx|italic title prefixed}} or <code><nowiki>{{DISPLAYTITLE}}</nowiki></code> for proper formatting, {{tld|Infobox ship begin/sandbox}} will not properly format the infobox caption.  To apply formatting, the article title must contain a recognizable ship prefix as defined by {{tlx|ship prefix}}.  Without a ship prefix, the caption will be rendered without formatting.
 +
 
 +
 
 +
</noinclude>