Template:Infobox row/doc: Difference between revisions
Jump to navigation
Jump to search
imported>Kittymmeow (Created page with "{{doc/start}} This is a skeleton for infobox rows, for use in {{tl|infobox}}. Adapted from [https://minecraft.gamepedia.com/Template:Infobox_row Minecraft Wiki]. == Usage ==...") |
(improve example to show possibility for 2-column merged row & custom css class) |
||
Line 7: | Line 7: | ||
<pre style="width: 154px">{{infobox row | <pre style="width: 154px">{{infobox row | ||
| label | | label | ||
| | | field | ||
}}</pre> | }}</pre> | ||
Alternatively, you can use the named parameter {{p|label}} as a substitute for {{p|1}}, and {{p| | Alternatively, you can use the named parameter {{p|label}} as a substitute for {{p|1}}, and {{p|field}} as a substitute for {{p|2}}. | ||
The parameter {{p|class}} can be added to add a class to the contents of the row. | The parameter {{p|class}} can be added to add a class to the contents of the row. | ||
Line 17: | Line 17: | ||
<pre> | <pre> | ||
{{infobox | {{infobox | ||
|rows={{infobox row| | |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}} | |||
}} | }} | ||
</pre> | </pre> | ||
will output | will output | ||
{{infobox | {{infobox | ||
|rows={{infobox row| | |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}} | |||
}} | }} | ||
<div style="clear:both;"></div> <!-- clear float to force other content beneath the infobox example --> | |||
<!-- template categories/interwikis --> | <!-- template categories/interwikis --> | ||
<includeonly> | <includeonly> |
Revision as of 19:37, 8 August 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 |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
Infobox row
Name
|
Qud Object |
---|---|
Faction
|
Grazing Hedonists |
Specify
field without a label to span both columns. For example, maybe you'd do this for a section header | |
Custom
|
<this row has custom-css-class> |
Stats
|
etc |