Template:Infobox data structure/doc: Difference between revisions

From SlyMods
Jump to navigation Jump to search
Content added Content deleted
(Added size param to templatedata)
(Updated templatedata, added example)
Line 1: Line 1:
An infobox template for data structure articles. It automatically categorizes the article based on the namespace.
An infobox template for data structure articles. It automatically categorizes the article based on the namespace.

== Example ==
{{Infobox data structure
| size= 0x100
}}
<pre>{{Infobox data structure
| size= 0x100
}}</pre>


== Template data ==
== Template data ==
Line 6: Line 14:
{
{
"params": {
"params": {
"name": {},
"official": {
"official": {
"label": "official name?",
"label": "official name?",
Line 16: Line 23:
"description": "The size of the struct (in bytes)",
"description": "The size of the struct (in bytes)",
"example": "0x14",
"example": "0x14",
"type": "string",
"type": "number",
"suggested": true
"suggested": true
},
"title": {
"description": "Optional, default is page title",
"type": "string"
}
}
},
},
"description": "An infobox for data structures.",
"description": "An infobox for data structures.",
"format": "block"
"format": "block",
"paramOrder": [
"title",
"official",
"size"
]
}
}
</templatedata>
</templatedata>

Revision as of 14:39, 12 September 2022

An infobox template for data structure articles. It automatically categorizes the article based on the namespace.

Example

Infobox data structure/doc
Data Structure
Size0x100
{{Infobox data structure
| size= 0x100
}}

Template data

This is the TemplateData documentation for this template used by VisualEditor and other tools.

TemplateData for Infobox data structure

An infobox for data structures.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
titletitle

Optional, default is page title

Stringoptional
official name?official

Whether the article name is the official structure name (y/n)

Default
n
Example
y
Unknownoptional
sizesize

The size of the struct (in bytes)

Example
0x14
Numbersuggested

Redirects