Template:Infobox row

From The Blockheads Wiki
Revision as of 15:54, 6 August 2024 by JarlPenguin (talk | contribs) (Created page with "<includeonly>{{ #if: {{{1|}}}{{{label|}}} | ! {{ucfirst: {{{1|{{{label|}}}}}} }} }} | {{#if: {{{class|}}} | class="{{{class}}}" }} {{ #if: {{{1|}}}{{{label|}}} || colspan="2" }} | {{{2|{{{field|}}}}}} <code class="history-json">{"label": "{{JsonEscape|{{ucfirst: {{{1|{{{label|}}}}}} }}}}", "field": "{{JsonEscape|{{{2|{{{field|}}}}}}}}"}</code> |-</includeonly><noinclude> {{documentation}} <!-- Put categories/interwiki on the documentation page --> </noinclude>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
[view] [edit] [history] [refresh]Documentation

This is a skeleton for infobox rows, for use in {{infobox}}.

Usage

{{infobox row
| label
| data
}}

Alternatively, you can use the named parameter |label= as a substitute for |1=, and |field= as a substitute for |2=.

The parameter |class= can be added to add a class to the contents of the row.

Examples

Wikitext source code Visual result

{{#invoke: Infobox | infobox
|rows =
{{infobox row|Description|5 [[gold ingot]]s}}
{{infobox row|Ingedients|
* 5 [[iron ingot]]s
* 1 [[chest]]
}}
{{infobox row|Block entity data|
<div class{{=}}"treeview">
* {{nbt|compound}} Block entity data
** {{nbt|list|Items}}: List of items in this container.
*** {{nbt|compound}}: An item, including the slot tag.
** {{nbt|int|TransferCooldown}}: Time until the next transfer in [[game tick]]s, naturally between 1 and 8 or 0 if there is no transfer.
</div>
}}
{{infobox row|Tool|{{ItemLink|Stone Pickaxe}}}}
}}

Lua error: mw.text.jsonDecode: Syntax error.

{{#invoke: Infobox | infobox
|rows={{infobox row|Status|Fancy text |class=mcwiki-header mcwiki-header-grass}}
}}

Lua error: mw.text.jsonDecode: Syntax error.
[view] [edit] [history] [refresh]The above documentation is transcluded from Template:Infobox row/doc.