Difference between revisions of "Template:Infobox/Part"

From Kerbal Space Program Wiki
Jump to: navigation, search
(+update to lower case parameters; *use Partbox/Line;)
(+autocat; *update to lowercase parameters;)
Line 28: Line 28:
 
|-
 
|-
 
| colspan="3" style="text-align: center;" | <small>{{#if: {{{class|{{{Class|}}}}}}|[[API:{{{class|{{{Class}}}}}}|{{{class|{{{Class}}}}}}]]|Unknown API}}&nbsp;·&nbsp;{{#if: {{{part|}}}|[[Parts/{{{part}}}/part.cfg|part.cfg]]|{{#if: {{{cfg|}}}|[[{{{cfg}}}|part.cfg]]|Unknown cfg}}}}
 
| colspan="3" style="text-align: center;" | <small>{{#if: {{{class|{{{Class|}}}}}}|[[API:{{{class|{{{Class}}}}}}|{{{class|{{{Class}}}}}}]]|Unknown API}}&nbsp;·&nbsp;{{#if: {{{part|}}}|[[Parts/{{{part}}}/part.cfg|part.cfg]]|{{#if: {{{cfg|}}}|[[{{{cfg}}}|part.cfg]]|Unknown cfg}}}}
|}</includeonly><noinclude>{{Box|notice.svg|'''This article is currently undergoing a major expansion or revamping.''' While the transition is in progress there could be inconsistencies.|#aaaaff|}}{{Template:Partbox
+
|}{{#if: {{{Name|}}}{{{Role|}}}{{{Class|}}}{{{File|}}}{{{Costs|}}}{{{Mass|}}}{{{Drag|}}}{{{Temp|}}}{{{Tolerance|}}}{{{Manufacturer|}}}{{{More|}}}|[[Category:Partbox usage with uppercase|{{BASEPAGENAME}}]]}}</includeonly><noinclude>{{Template:Partbox
|Name=TVR-1180C Mk1 Stack Tri-Coupler
+
|name=TVR-1180C Mk1 Stack Tri-Coupler
|Role=Adapter
+
|role=Adapter
 
|size=small
 
|size=small
|Class=
+
|class=
|File=Tvr-1180C_mk1_stack_tri-coupler.jpg
+
|file=Tvr-1180C_mk1_stack_tri-coupler.jpg
|Costs=680
+
|costs=680
|Mass=0.3
+
|mass=0.3
|Drag=0.3
+
|drag=0.3
|Temp=3400
+
|temp=3400
|Tolerance=12
+
|tolerance=12
|Manufacturer=Found lying by the side of the road
+
|manufacturer=Found lying by the side of the road
 
|since=0.7.3
 
|since=0.7.3
 
|part=stackTriCoupler
 
|part=stackTriCoupler
Line 47: Line 47:
 
{{Template:Partbox/Parameters}}
 
{{Template:Partbox/Parameters}}
  
For compatibility it supports the {{{cfg}}} parameter but should be replaced by the {{{part}}} parameter.
+
For compatibility it supports the {{{cfg}}} parameter but should be replaced by the {{{part}}} parameter. This template also supports uppercase parameter (<tt>Mass</tt> instead of <tt>mass</tt>) but because they should be removed, new usages should use the lower case parameter. If an article/template uses the uppercase parameter it will be added to [[:Category:Partbox usage with uppercase]].
  
 
=== More Parameter ===
 
=== More Parameter ===
Line 91: Line 91:
 
Example used on this page:
 
Example used on this page:
 
<pre>{{Template:Partbox
 
<pre>{{Template:Partbox
|Name=TVR-1180C Mk1 Stack Tri-Coupler
+
|name=TVR-1180C Mk1 Stack Tri-Coupler
|Role=Adapter
+
|role=Adapter
|Class=
+
|class=
|File=Tvr-1180C_mk1_stack_tri-coupler.jpg
+
|file=Tvr-1180C_mk1_stack_tri-coupler.jpg
 
|size=small
 
|size=small
|Costs=680
+
|costs=680
|Mass=0.3
+
|mass=0.3
|Drag=0.3
+
|drag=0.3
|Temp=3400
+
|temp=3400
|Tolerance=12
+
|tolerance=12
|Manufacturer=Found lying by the side of the road
+
|manufacturer=Found lying by the side of the road
 
|since=0.7.3
 
|since=0.7.3
 
|part=stackTriCoupler
 
|part=stackTriCoupler

Revision as of 14:54, 13 April 2013

Template:Partbox

Parameters

Template:Partbox/Parameters

For compatibility it supports the {{{cfg}}} parameter but should be replaced by the {{{part}}} parameter. This template also supports uppercase parameter (Mass instead of mass) but because they should be removed, new usages should use the lower case parameter. If an article/template uses the uppercase parameter it will be added to Category:Partbox usage with uppercase.

More Parameter

To add additional fields the more {{{More}}} parameter should be used with {{Partbox/Line}}.

Roles

For different roles with special additional parameters one of the following templates should be used:

Those templates don't support the {{{cfg}}} parameter!

Template

{{Partbox
|name=
|role=
|class=
|file=
|size=
|size2=
|costs=
|mass=
|drag=
|temp=
|tolerance=
|manufacturer=
|more=
|since=
|part=
}}

Example

Example used on this page:

{{Template:Partbox
|name=TVR-1180C Mk1 Stack Tri-Coupler
|role=Adapter
|class=
|file=Tvr-1180C_mk1_stack_tri-coupler.jpg
|size=small
|costs=680
|mass=0.3
|drag=0.3
|temp=3400
|tolerance=12
|manufacturer=Found lying by the side of the road
|since=0.7.3
|part=stackTriCoupler
}}