Difference between revisions of "Template:EnumValue"

From Kerbal Space Program Wiki
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{{name}}} {{#if:{{{value|}}}| = {{{value}}}|}} ''{{{desc|}}} ''<br /></includeonly><noinclude>
+
<includeonly>{{{name}}} {{#if:{{{value|}}}| = {{{value}}}|}} ''<small>{{{desc|}}} ''</small><br /></includeonly><noinclude>
 
A '''Template:EnumValue''' is a single enum value as part of [[Template:Enum]] (Which is itself inside a [[Template:Enums]]). This is for enums on a class page, not enums on their own page. For enumerations on their own page see [[Template:PageEnum]].
 
A '''Template:EnumValue''' is a single enum value as part of [[Template:Enum]] (Which is itself inside a [[Template:Enums]]). This is for enums on a class page, not enums on their own page. For enumerations on their own page see [[Template:PageEnum]].
 +
 +
Takes string parameters:
 +
:"name" - Required. The name of this enumeration.
 +
:"value" - Optional. The numeric value of this enum value e.g. "13".
 +
:"desc" - Optional. The description of this enum value.
  
 
Example:
 
Example:
Line 7: Line 12:
 
{{EnumValue|name=secondValue|value=13|desc=Something}}
 
{{EnumValue|name=secondValue|value=13|desc=Something}}
 
{{EnumValue|name=thirdValue}}
 
{{EnumValue|name=thirdValue}}
 +
{{EnumValue|name=fourthValue|desc=Something}}
  
 
[[Category:Templates]]
 
[[Category:Templates]]
 
[[Category:API Templates]]
 
[[Category:API Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 22:30, 16 October 2015

A Template:EnumValue is a single enum value as part of Template:Enum (Which is itself inside a Template:Enums). This is for enums on a class page, not enums on their own page. For enumerations on their own page see Template:PageEnum.

Takes string parameters:

"name" - Required. The name of this enumeration.
"value" - Optional. The numeric value of this enum value e.g. "13".
"desc" - Optional. The description of this enum value.

Example:

firstValue = 13
secondValue = 13 Something
thirdValue
fourthValue Something