More actions
No edit summary Tag: 2017 source edit |
Update template data Tag: 2017 source edit |
||
Line 2: | Line 2: | ||
'''Displays a ''type widget''.''' | '''Displays a ''type widget''.''' | ||
* | * All options are routed through [[Module:Type]]. | ||
Stylesheet: [[Template:Type/style.css]] (edit to add colors and decorations for custom types) | Stylesheet: [[Template:Type/style.css]] (edit to add colors and decorations for custom types) | ||
Line 35: | Line 33: | ||
"function", | "function", | ||
"table", | "table", | ||
"Vector", | |||
"Matrix" | |||
], | ], | ||
"required": true | "required": true, | ||
"aliases": [ | |||
"name" | |||
], | |||
"description": "Type name ('table' etc.) Supports modifiers, like ? and [].", | |||
"type": "string" | |||
}, | |||
"2": { | |||
"description": "Type modifiers (compatibility)", | |||
"deprecated": "Attach modifiers directly to the type name." | |||
}, | }, | ||
"link": { | "link": { | ||
"label": "Custom link target", | "label": "Custom link target", | ||
"type": "wiki-page-name" | "type": "wiki-page-name" | ||
}, | }, | ||
" | "text": { | ||
"label": "Custom text", | |||
"description": "If provided, this text will be displayed instead of the type name. The link and styling will still be determined by the type name.", | |||
"type": "content" | |||
"label": " | |||
"description": " | |||
"type": "content" | |||
} | } | ||
}, | }, | ||
Line 64: | Line 60: | ||
"paramOrder": [ | "paramOrder": [ | ||
"1", | "1", | ||
" | "link", | ||
" | "text", | ||
"2" | |||
], | ], | ||
"format": "inline" | "format": "inline" | ||
} | } | ||
</templatedata></noinclude> | </templatedata></noinclude> |
Revision as of 20:10, 28 September 2024
Displays a type widget.
- All options are routed through Module:Type.
Stylesheet: Template:Type/style.css (edit to add colors and decorations for custom types)
Examples
- nil
{{type|nil}}
- number
- number | nil (optional number)
- string
- boolean
- function
- table
- Vector (Vector2, Vector3, Vector4)
- Matrix (Matrix2, Matrix3, Matrix4)
- Event (custom type that exists)
- CrashAPI (custom type that doesn't exist)
- Main Page (links to Event)
{{type|Main Page|link=Event}}
Displays and links to types.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Type name | 1 name | Type name ('table' etc.) Supports modifiers, like ? and [].
| String | required |
Custom link target | link | no description | Page name | optional |
Custom text | text | If provided, this text will be displayed instead of the type name. The link and styling will still be determined by the type name. | Content | optional |
2 | 2 | Type modifiers (compatibility) | Unknown | deprecated |