Template:Infobox row: Difference between revisions
Jump to navigation
Jump to search
imported>Kittymmeow No edit summary |
imported>Ontoclasm (Align infobox row labels to the left) |
||
Line 1: | Line 1: | ||
<includeonly>{{ #if: {{{1|}}}{{{label|}}} | | <includeonly>{{ #if: {{{1|}}}{{{label|}}} | | ||
! {{ucfirst: {{{1|{{{label|}}}}}} }} }} | ! <div style="text-align:left"> {{ucfirst: {{{1|{{{label|}}}}}} }} </div> }} | ||
| {{#if: {{{class|}}} | class="{{{class}}}" }} {{ #if: {{{1|}}}{{{label|}}} || colspan="2" }} | | | {{#if: {{{class|}}} | class="{{{class}}}" }} {{ #if: {{{1|}}}{{{label|}}} || colspan="2" }} | | ||
{{{2|{{{field|}}}}}} | {{{2|{{{field|}}}}}} |
Revision as of 04:20, 25 May 2019
Documentation
[purge]
This is a skeleton for infobox rows, for use in {{infobox}}
.
Adapted from Minecraft Wiki.
Usage
{{infobox row | label | field }}
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.
Example
{{infobox |image=Caves_of_qud_logo.png |rows= {{infobox row|Name|Qud Object}} {{infobox row|label=Faction|field=Grazing Hedonists}} {{infobox row|field=<div style="text-align:center;border-top:var(--infobox-border);border-bottom:var(--infobox-border);">Specify <code>field</code> without a <code>label</code> to span both columns. For example, maybe you'd do this for a section header</div>}} {{infobox row|class=custom-css-class|Custom|<this row has custom-css-class>}} {{infobox row|label=Stats|field=etc}} }}
will output