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: Difference between revisions

Template page
No edit summary
m Rewrite. The old #if: {{{2}}} always tested true. Because the transcluded pages did/do their own testing for the value of mode that did not matter. It still does not matter, but the code here now at least functions as intended.
 
(47 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<noinclude>{{Color box|color=#144f1d|border=#2f8f2f|This template is under major development and might not be usable for a few days. Planned for use in conjunction with : Template:ShipBoxLarge & Template:ShipBoxTooltip}}</noinclude>
<includeonly>{{ #if:{{{1|}}}
{{#switch: {{{1}}}  
| {{ :{{{1}}}|mode= {{#if: {{{2|}}} | {{{2}}} | tooltip }} }}
|large={{ShipBoxLarge|shipimg={{{shipimg}}}|caption={{{caption}}}|shipname={{{shipname}}}|class={{{class}}}|highs={{{highs}}}|turrets={{{turrets}}}|launchers={{{launchers}}}|mediums={{{mediums}}}|lows={{{lows}}}|cargohold={{{cargohold}}}|dronebay={{{dronebay}}}|bandwidth={{{bandwidth}}}|roles={{{roles}}}|variations={{{variations}}}|bonuses={{{bonuses}}}|info={{{info}}}}}
| {{Co|red|!!}} No ship name specified [[Template:Ship/doc|(please read the documentation.)]] {{Co|red|!!}}
|{{ShipBoxTooltip|shipimg={{{shipimg}}}|caption={{{caption}}}|shipname={{{shipname}}}|class={{{class}}}|highs={{{highs}}}|turrets={{{turrets}}}|launchers={{{launchers}}}|mediums={{{mediums}}}|lows={{{lows}}}|cargohold={{{cargohold}}}|dronebay={{{dronebay}}}|bandwidth={{{bandwidth}}}|roles={{{roles}}}|variations={{{variations}}}|bonuses={{{bonuses}}}|info={{{info}}}}}  
}}</includeonly><noinclude>
}}
{{documentation}}
</noinclude>