Difference between revisions of "Template:Type"
From Kerbal Space Program Wiki
(+documention; !corrected parameter numbering;) |
|||
Line 1: | Line 1: | ||
− | {{#switch:{{{1|{{{type|}}}}}} | + | <includeonly>{{#switch:{{{1|{{{type|}}}}}} |
|int | |int | ||
|uint | |uint | ||
Line 12: | Line 12: | ||
|long | |long | ||
|Int16 | |Int16 | ||
− | |short=<span style="color:green;" title="{{{ | + | |short=<span style="color:green;" title="{{{2|{{{desc|}}}}}}">{{{1|{{{type|}}}}}}</span> |
− | |#default=[[API:{{{1|{{{type|}}}}}}|<span style="color:green;" title="{{{ | + | |#default=[[API:{{{1|{{{type|}}}}}}|<span style="color:green;" title="{{{2|{{{desc|}}}}}}">{{{1|{{{type|}}}}}}</span>]] |
− | }} | + | }}</includeonly><noinclude>Creates an API link. If won't link to the following values: |
+ | *int | ||
+ | *uint | ||
+ | *double | ||
+ | *float | ||
+ | *string | ||
+ | *String | ||
+ | *byte | ||
+ | *Byte | ||
+ | *Int32 | ||
+ | *Int64 | ||
+ | *long | ||
+ | *Int16 | ||
+ | *short | ||
+ | |||
+ | == Examples == | ||
+ | {| class="wikitable" | ||
+ | ! Code | ||
+ | ! Result | ||
+ | |- | ||
+ | | <pre>{{Type{{!}}Vessel}}</pre> || {{Type|Vessel}} | ||
+ | |- | ||
+ | | <pre>{{Type{{!}}Vessel{{!}}A vessel}}</pre> || {{Type|Vessel|A vessel}} | ||
+ | |- | ||
+ | | <pre>{{Type{{!}}type=Vessel{{!}}desc=A vessel}}</pre> || {{Type|type=Vessel|desc=A vessel}} | ||
+ | |} | ||
+ | |||
+ | [[Category:Templates|Type]] | ||
+ | [[Category:API Templates|Type]]</noinclude> |
Revision as of 12:37, 21 April 2013
Creates an API link. If won't link to the following values:
- int
- uint
- double
- float
- string
- String
- byte
- Byte
- Int32
- Int64
- long
- Int16
- short
Examples
Code | Result |
---|---|
{{Type{{!}}Vessel}} |
Vessel |
{{Type{{!}}Vessel{{!}}A vessel}} |
Vessel |
{{Type{{!}}type=Vessel{{!}}desc=A vessel}} |
Vessel |