Template:Infobox row/doc: Difference between revisions

From Caves of Qud Wiki
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 ==...")
 
m (fix broken file error on this page)
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:
<pre style="width: 154px">{{infobox row
<pre style="width: 154px">{{infobox row
| label
| label
| data
| field
}}</pre>
}}</pre>


Alternatively, you can use the named parameter {{p|label}} as a substitute for {{p|1}}, and {{p|data}} as a substitute for {{p|2}}.
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|title|answer}}
|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}}
}}
}}
</pre>
</pre>
will output  
will output  
{{infobox
{{infobox
|rows={{infobox row|title|answer}}
|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}}
}}
}}
<div style="clear:both;"></div> <!-- clear float to force other content beneath the infobox example -->
<!-- template categories/interwikis -->
<!-- template categories/interwikis -->
<includeonly>
<includeonly>

Latest revision as of 21:00, 5 September 2019

Template-info.png Documentation

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

Infobox row
Caves of qud logo.png
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