Template:Infobox/doc: Difference between revisions
Appearance
formatting |
titlebg |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<templatedata> | <templatedata> | ||
{ | { | ||
"description": "Meta-template for building specific infobox templates. It should not be used directly on article pages.", | |||
"params": { | |||
"title": { | |||
"label": "Title", | |||
"description": "Title displayed in the infobox header.", | |||
"type": "string" | |||
}, | |||
"image": { | |||
"label": "Image", | |||
"description": "Filename of an image to display, without the File: prefix.", | |||
"type": "wiki-file-name" | |||
}, | |||
"caption": { | |||
"label": "Caption", | |||
"description": "Caption displayed below the image.", | |||
"type": "string" | |||
}, | |||
"label1": { | |||
"label": "Label 1", | |||
"description": "Label for the first data row.", | |||
"type": "string" | |||
}, | |||
"data1": { | |||
"label": "Data 1", | |||
"description": "Content for the first data row. Row is hidden if empty.", | |||
"type": "string" | |||
}, | |||
"titlebg": { | |||
"label": "Title background color", | |||
"default": "var(--vw-accent-subtle)" | |||
} | |||
}, | |||
"paramOrder": [ | |||
"title", | |||
"image", | |||
"caption", | |||
"label1", | |||
"data1", | |||
"titlebg" | |||
] | |||
} | } | ||
</templatedata> | </templatedata> | ||
Latest revision as of 22:16, 30 May 2026
Meta-template for building specific infobox templates. It should not be used directly on article pages.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Title | title | Title displayed in the infobox header. | String | optional |
| Image | image | Filename of an image to display, without the File: prefix. | File | optional |
| Caption | caption | Caption displayed below the image. | String | optional |
| Label 1 | label1 | Label for the first data row. | String | optional |
| Data 1 | data1 | Content for the first data row. Row is hidden if empty. | String | optional |
| Title background color | titlebg | no description
| Unknown | optional |
Additional label/data pairs follow the same pattern: label2/data2, label3/data3, and so on. There is no hard limit.
Example
Call this template from another template, passing labeled rows as parameters:
{{Infobox
| title = {{{name|}}}
| image = {{{image|}}}
| caption = {{{caption|}}}
| label1 = Founded
| data1 = {{{founded|}}}
| label2 = Type
| data2 = {{{type|}}}
}}
See also
- Module:Infobox: the Lua module that renders this template
- Template:Infobox group