Difference between revisions of "User:Alistaire/Template:DefsStdContentSwitch/doc"
Jump to navigation
Jump to search
(→Accepted values: Added defName) |
(Added examples) |
||
Line 10: | Line 10: | ||
| default || ''(optional):'' The default value for this datatype in this element, (default: {{{default}}}). | | default || ''(optional):'' The default value for this datatype in this element, (default: {{{default}}}). | ||
|- | |- | ||
− | | | + | | info || ''(optional):'' Extra info for this datatype in this element, ({{{info}}}). |
+ | |- | ||
+ | |}<br/><br/> | ||
+ | |||
+ | ==Examples== | ||
+ | |||
+ | {| | ||
+ | ! Input !! Output | ||
+ | |- | ||
+ | | <pre>{{User:Alistaire/Template:DefsStdContentSwitch|string}}</pre> | ||
+ | | {{User:Alistaire/Template:DefsStdContentSwitch|string}} | ||
+ | |- | ||
+ | | <pre>{{User:Alistaire/Template:DefsStdContentSwitch|bool|default=true}}</pre> | ||
+ | | {{User:Alistaire/Template:DefsStdContentSwitch|bool|default=true}} | ||
+ | |- | ||
+ | | <pre>{{User:Alistaire/Template:DefsStdContentSwitch|integer|default=1|info=0-100}}</pre> | ||
+ | | {{User:Alistaire/Template:DefsStdContentSwitch|integer|default=1|info=0-100}} | ||
|- | |- | ||
|}<br/><br/> | |}<br/><br/> |
Revision as of 15:03, 12 April 2015
Example documentation
Parameters
Parameter | Explanation |
---|---|
1 | (required): The datatype, check "Accepted values". |
default | (optional): The default value for this datatype in this element, (default: {{{default}}}). |
info | (optional): Extra info for this datatype in this element, ({{{info}}}). |
Examples
Input | Output |
---|---|
{{User:Alistaire/Template:DefsStdContentSwitch|string}} |
string |
{{User:Alistaire/Template:DefsStdContentSwitch|bool|default=true}} |
boolean (default: true) |
{{User:Alistaire/Template:DefsStdContentSwitch|integer|default=1|info=0-100}} |
int (default: 1) (0-100) |
Accepted values
Value | Output |
---|---|
anyuri | xs:anyURI |
bool boolean |
xs:boolean |
dec decimal |
xs:decimal |
defName | defName |
double | xs:double |
float | xs:float |
int | xs:int |
integer | xs:integer |
name | xs:Name |
normstr normstring normalizedstring |
xs:normalizedString |
rgb | rgb |
str string |
xs:string |
stringnorm | xs:normalizedString |
src uri |
xs:anyURI |
vector2 | vector2 |
vector3 | vector3 |