Difference between revisions of "Template:EnumValue"

From Kerbal Space Program Wiki
Jump to: navigation, search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>;{{{name}}} {{#if:{{{value|}}}| = {{{value}}}|}}
+
<includeonly>{{{name}}} {{#if:{{{value|}}}| = {{{value}}}|}} ''<small>{{{desc|}}} ''</small><br /></includeonly><noinclude>
:{{{desc|''{{lang
+
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]].
|en=No description exists for {{{name}}}.
+
 
}}''}}}</includeonly><noinclude>
+
Takes string parameters:
A template for the values of an enumeration. To be used in [[API:EnumValues]].
+
:"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:
  
{{EnumValue|name=someEnumValue|value=13|desc=Something}}
+
{{EnumValue|name=firstValue|value=13}}
 +
{{EnumValue|name=secondValue|value=13|desc=Something}}
 +
{{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