Template:Infobox row: Difference between revisions
Jump to navigation
Jump to search
imported>Ontoclasm (Align infobox row labels to the left) |
m (mark infobox labels as auxilary data for searching purposes (lowers their search importance) - see https://www.mediawiki.org/wiki/Help:CirrusSearch#Exclude_content_from_the_search_index) |
||
Line 1: | Line 1: | ||
<includeonly>{{ #if: {{{1|}}}{{{label|}}} | | <includeonly>{{ #if: {{{1|}}}{{{label|}}} | | ||
! <div style="text-align:left"> {{ucfirst: {{{1|{{{label|}}}}}} }} </div> }} | ! <div style="text-align:left" class="searchaux"> {{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|}}}}}} |
Latest revision as of 18:11, 16 December 2021
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