Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Type: Difference between revisions

Template page
PenguinEncounter (talk | contribs)
No edit summary
Tag: 2017 source edit
PenguinEncounter (talk | contribs)
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...

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}}

Testcases page.

Displays and links to types.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Type name1

no description

Suggested values
nil boolean integer number string function table
Unknownrequired
Custom link target2

no description

Page nameoptional
Contents