More actions
No edit summary Tag: 2017 source edit |
use fallthrough to reduce byte count Tag: 2017 source edit |
||
Line 2: | Line 2: | ||
|{{type/link|{{{1}}}|mod={{{2|{{{mod|}}}}}}|link={{{3|{{{link}}}}}}}} | |{{type/link|{{{1}}}|mod={{{2|{{{mod|}}}}}}|link={{{3|{{{link}}}}}}}} | ||
|{{#switch:{{{1}}} | |{{#switch:{{{1}}} | ||
| nil | | nil | ||
| number | | number | ||
| numbers | | numbers | ||
| double | | double | ||
| doubles | | doubles | ||
| integer | | integer | ||
| integers | | integers | ||
| string | | string | ||
| strings | | strings | ||
| boolean | | boolean | ||
| bool | | bool | ||
| booleans | | booleans | ||
| true | | true | ||
| false | | false | ||
| function | | function | ||
| functions | | functions | ||
| table | | table | ||
| tables = {{type/builtin|{{{1}}}|mod={{{2|{{{mod|}}}}}}}} | | tables = {{type/builtin|{{{1}}}|mod={{{2|{{{mod|}}}}}}}} | ||
| {{type/custom|{{{1}}}|mod={{{2|{{{mod|}}}}}}}} | | {{type/custom|{{{1}}}|mod={{{2|{{{mod|}}}}}}}} |
Revision as of 01:42, 27 September 2024
Displays a type widget.
- If a link is provided: Template:Type/link
- Built-in types: Template:Type/builtin
- Custom types (fallback): Template:Type/custom. If the page with
[argument 1] (type)
(i.e. disambiguated) exists, that page will be used instead of the plain name for the link.
Stylesheet: Template:Type/style.css (edit to add colors and decorations for custom types)
Examples
- Template:Type/builtin
{{type|nil}}
- Template:Type/builtin
- Template:Type/builtin (optional number)
- Template:Type/builtin
- Template:Type/builtin
- Template:Type/builtin
- Template:Type/builtin
- Template:Type/custom (custom type that exists)
- Template:Type/custom (custom type that doesn't exist)
- Template:Type/link (links to the Main Page)
{{type|Main Page|link=Main Page}}
Displays and links to types.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Type name | 1 | no description
| Unknown | required |
Type modifiers | mod 2 | Modifiers to the type, like array / optional
| Content | optional |
Custom link target | link 3 | no description | Page name | optional |