32,450 ARTICLES
ON THIS WIKI

Template:Infobox/Row

Template documentation (for the above template, sometimes hidden or invisible)
This template is written in Lua. The full source code can be found at Module:Infobox.

The {{Infobox/Row}} template renders a single row for use inside an infobox wikitable. It is intended to be used through the rows parameter of an infobox template (such as {{Infobox/InvItem}} or {{Infobox/Block}}) to add custom rows beyond the ones the parent template provides by default.

The template expands to bare wikitable row syntax. As a result, it only produces meaningful output when used inside an open wikitable, such as the body of an infobox. When placed elsewhere on a page, the raw wikitext characters are shown instead.

Syntax

{{Infobox/Row|name|value}}

Two further positional parameters are accepted for fine grained styling control:

{{Infobox/Row|name|value|nameattrs|valueattrs}}

Parameters

  • 1 (name): The label shown in the left cell of the row.
  • 2 (value): The content shown in the right cell of the row. Pass the literal string nil to suppress the row entirely.
  • 3 (nameattrs): Additional HTML/wiki attributes inserted into the name cell, such as style="...". Default: Empty.
  • 4 (valueattrs): Additional HTML/wiki attributes inserted into the value cell. Default: Empty.

The name cell already carries the class infobox-infoname and the value cell already carries the class infobox-infovalue. Because only the first class attribute on a wikitable cell takes effect, adding more classes through nameattrs or valueattrs has no visible result. style attributes work as expected.

Rendering

The output depends on which positional parameters are provided:

  • Name and value: A standard two column row with the name in the left cell and the value in the right cell.
  • Name only: A single, full-width row spanning both columns, centered (class infobox-centertext). Useful for section dividers or banner style entries within the infobox.
  • Value only: A two column row with an empty name cell.
  • Neither, or value is the literal string nil: The row is omitted entirely from the output.

The nil suppression rule is the mechanism behind features like the gridimg=nil override on {{Infobox/InvItem}}, which hides the grid image row.

Examples

Adding two custom rows to an item infobox:

{{Infobox/InvItem
|name = Mystery Widget
|rows =
{{Infobox/Row|Power Output|240 RF/t}}
{{Infobox/Row|Cooling Required|Yes}}
}}

A full-width banner row (name only):

{{Infobox/Row|Special Properties}}

A row with inline styling on both cells:

{{Infobox/Row|Color|Red|style{{=}}"color:#888;"|style{{=}}"color:red; font-weight:bold;"}}

See Also

  • {{Infobox/InvItem}}: Standard inventory item infobox that accepts custom rows through its rows parameter.
  • {{Infobox/Block}}: Block infobox that also accepts custom rows.
Visit Template:Infobox/Row/doc to change this text! (How does this work?)

Done making changes? Refresh this text! (Why?)