More actions
No edit summary Tag: 2017 source edit |
No edit summary Tag: 2017 source edit |
||
Line 5: | Line 5: | ||
| string = {{type/builtin|{{{1}}}}} | | string = {{type/builtin|{{{1}}}}} | ||
| boolean = {{type/builtin|{{{1}}}}} | | boolean = {{type/builtin|{{{1}}}}} | ||
| true = {{type/builtin|{{{1}}}}} | |||
| false = {{type/builtin|{{{1}}}}} | |||
| function = {{type/builtin|{{{1}}}}} | | function = {{type/builtin|{{{1}}}}} | ||
| table = {{type/builtin|{{{1}}}}} | | table = {{type/builtin|{{{1}}}}} | ||
| {{type/custom|{{{1}}}}} | | {{type/custom|{{{1}}}}} | ||
}}}}</includeonly><noinclude> | }}}}</includeonly><noinclude> <!-- Documentation starts here. --> | ||
'''Displays a ''type widget''.''' | '''Displays a ''type widget''.''' | ||
Line 29: | Line 31: | ||
* {{type|PenguinEncounter|User:PenguinEncounter}} (links to [[User:PenguinEncounter]]) <code><nowiki>{{type|PenguinEncounter|User:PenguinEncounter}}</nowiki></code> | * {{type|PenguinEncounter|User:PenguinEncounter}} (links to [[User:PenguinEncounter]]) <code><nowiki>{{type|PenguinEncounter|User:PenguinEncounter}}</nowiki></code> | ||
[[Template:Type/testcases|Testcases page.]] | [[Template:Type/testcases|Testcases page.]] | ||
</noinclude> | <templatedata> | ||
{ | |||
"params": { | |||
"1": { | |||
"label": "Type name", | |||
"suggestedvalues": [ | |||
"nil", | |||
"boolean", | |||
"integer", | |||
"number", | |||
"string", | |||
"function", | |||
"table" | |||
], | |||
"required": true | |||
}, | |||
"2": { | |||
"label": "Custom link target", | |||
"type": "wiki-page-name" | |||
} | |||
}, | |||
"description": "Displays and links to types.", | |||
"paramOrder": [ | |||
"1", | |||
"2" | |||
], | |||
"format": "inline" | |||
} | |||
</templatedata></noinclude> |
Revision as of 19:58, 26 September 2024
Displays a type widget.
Chooses between...
- If argument 2 is provided, use that as the link target.
- Specialized template for built-in Lua types.
- Specialized template for custom Figura types. 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
- 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 User:PenguinEncounter)
{{type|PenguinEncounter|User:PenguinEncounter}}
Displays and links to types.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Type name | 1 | no description
| Unknown | required |
Custom link target | 2 | no description | Page name | optional |