Template:Infobox: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Chris Day
No edit summary
imported>Caesar Schinas
No edit summary
Line 55: Line 55:
{{Infobox/row | label = {{{25_label|}}} | data = {{{25_data|}}} | labelstyle = {{{25_labelstyle|}}} | datastyle = {{{25_datastyle|}}} }}
{{Infobox/row | label = {{{25_label|}}} | data = {{{25_data|}}} | labelstyle = {{{25_labelstyle|}}} | datastyle = {{{25_datastyle|}}} }}
|-
|-
|}</includeonly>
|}</includeonly><noinclude>
<noinclude>
==== Usage ====
<big>'''Usage'''</big>
The title of the infobox is defined by the <code>title</code> variable.


Each row in an infobox can be defined with four variables.
Each row is defined using a combination of the following variables.
# label
# <code>label</code>
# labelstyle
# <code>labelstyle</code>
# data
# <code>data</code>
# datastyle
# <code>datastyle</code>


Up to 25 different rows can be defined. They can be used in various combinations as seen in the code below. If no label or data style is designated the default style will be used.
The data variables can be used alone to create a full-width data row without a label.<br />
A centred bold header, without data, can be created by setting the data variable to <code>---</code>.<br />
If no label or data style is designated the default styles will be used.


This text is '''above''' the infobox code.
Up to 25 different rows can be defined.
 
==== Example ====
{{Infobox
{{Infobox
| title   = This is the title
| title         = This is the title
| 1_label = 1 A Header
| 1_label       = 1 A Header
| 1_data = ---
| 1_data       = ---
| 2_label = 2 A Label
| 2_label       = 2 A Label
| 2_data = 2 Some Data
| 2_data       = 2 Some Data
| 3_label = 3 Another Label
| 3_label       = 3 Another Label
| 3_data = 3 Some more Data
| 3_data       = 3 Some more Data
| 4_label = 4 A Header
| 4_label       = 4 A Header
| 4_data = ---
| 4_data       = ---
| 5_label = 5 A Label only
| 5_label       = 5 A Label only
| 6_data = 6 Some data only that expands across both columns
| 6_data       = 6 Some data only that expands across both columns
| 8_label = 8 A Header
| 8_label       = 8 A Header
| 8_labelstyle=background:lightgrey
| 8_labelstyle = background:lightgrey
| 8_data = ---
| 8_data       = ---
| 9_label = 9 A Label
| 9_label       = 9 A Label
| 9_labelstyle=background:lightblue; font-style:italic
| 9_labelstyle = background:lightblue; font-style:italic
| 9_data = 9 Some Data
| 9_data       = 9 Some Data
| 10_label = 10 Another Label
| 10_label     = 10 Another Label
| 10_data = 10 Some more Data
| 10_data       = 10 Some more Data
| 10_datastyle=background:lightgreen; font-style:italic
| 10_datastyle = background:lightgreen; font-style:italic
| 11_label = 11 Another Label
| 11_label     = 11 Another Label
| 11_labelstyle=background:lightblue
| 11_labelstyle = background:lightblue
| 11_data = 11 Some more Data
| 11_data       = 11 Some more Data
| 11_datastyle=background:lightgreen
| 11_datastyle = background:lightgreen
| 12_label = 12 A Header
| 12_label     = 12 A Header
| 12_data = ---
| 12_data       = ---
| 13_label = 13 A Label only
| 13_label     = 13 A Label only
| 14_data = 14 Some data only that expands across both columns
| 14_data       = 14 Some data only that expands across both columns
| 14_datastyle=background:lightgreen; font-style:italic; border: 1px solid red
| 14_datastyle =background:lightgreen; font-style:italic; border: 1px solid red
}}
}}
This text is '''below''' the infobox code.
<big>'''Code for infobox'''</big>
<pre>
<pre>
{{Infobox
{{Infobox
| title   = This is the title
| title         = This is the title
| 1_label = 1 A Header
| 1_label       = 1 A Header
| 1_data = ---
| 1_data       = ---
| 2_label = 2 A Label
| 2_label       = 2 A Label
| 2_data = 2 Some Data
| 2_data       = 2 Some Data
| 3_label = 3 Another Label
| 3_label       = 3 Another Label
| 3_data = 3 Some more Data
| 3_data       = 3 Some more Data
| 4_label = 4 A Header
| 4_label       = 4 A Header
| 4_data = ---
| 4_data       = ---
| 5_label = 5 A Label only
| 5_label       = 5 A Label only
| 6_data = 6 Some data only that expands across both columns
| 6_data       = 6 Some data only that expands across both columns
| 8_label = 8 A Header
| 8_label       = 8 A Header
| 8_labelstyle=background:lightgrey
| 8_labelstyle = background:lightgrey
| 8_data = ---
| 8_data       = ---
| 9_label = 9 A Label
| 9_label       = 9 A Label
| 9_labelstyle=background:lightblue; font-style:italic
| 9_labelstyle = background:lightblue; font-style:italic
| 9_data = 9 Some Data
| 9_data       = 9 Some Data
| 10_label = 10 Another Label
| 10_label     = 10 Another Label
| 10_data = 10 Some more Data
| 10_data       = 10 Some more Data
| 10_datastyle=background:lightgreen; font-style:italic
| 10_datastyle = background:lightgreen; font-style:italic
| 11_label = 11 Another Label
| 11_label     = 11 Another Label
| 11_labelstyle=background:lightblue
| 11_labelstyle = background:lightblue
| 11_data = 11 Some more Data
| 11_data       = 11 Some more Data
| 11_datastyle=background:lightgreen
| 11_datastyle = background:lightgreen
| 12_label = 12 A Header
| 12_label     = 12 A Header
| 12_data = ---
| 12_data       = ---
| 13_label = 13 A Label only
| 13_label     = 13 A Label only
| 14_data = 14 Some data only that expands across both columns
| 14_data       = 14 Some data only that expands across both columns
| 14_datastyle=background:lightgreen; font-style:italic; border: 1px solid red
| 14_datastyle =background:lightgreen; font-style:italic; border: 1px solid red
}}
}}
</pre>
</pre>
</noinclude>
</noinclude>

Revision as of 17:31, 24 April 2009

Usage

The title of the infobox is defined by the title variable.

Each row is defined using a combination of the following variables.

  1. label
  2. labelstyle
  3. data
  4. datastyle

The data variables can be used alone to create a full-width data row without a label.
A centred bold header, without data, can be created by setting the data variable to ---.
If no label or data style is designated the default styles will be used.

Up to 25 different rows can be defined.

Example

This is the title
1 A Header
2 A Label 2 Some Data
3 Another Label 3 Some more Data
4 A Header
6 Some data only that expands across both columns
8 A Header
9 A Label 9 Some Data
10 Another Label 10 Some more Data
11 Another Label 11 Some more Data
12 A Header
14 Some data only that expands across both columns
{{Infobox
| title         = This is the title
| 1_label       = 1 A Header
| 1_data        = ---
| 2_label       = 2 A Label
| 2_data        = 2 Some Data
| 3_label       = 3 Another Label
| 3_data        = 3 Some more Data
| 4_label       = 4 A Header
| 4_data        = ---
| 5_label       = 5 A Label only
| 6_data        = 6 Some data only that expands across both columns
| 8_label       = 8 A Header
| 8_labelstyle  = background:lightgrey
| 8_data        = ---
| 9_label       = 9 A Label
| 9_labelstyle  = background:lightblue; font-style:italic
| 9_data        = 9 Some Data
| 10_label      = 10 Another Label
| 10_data       = 10 Some more Data
| 10_datastyle  = background:lightgreen; font-style:italic
| 11_label      = 11 Another Label
| 11_labelstyle = background:lightblue
| 11_data       = 11 Some more Data
| 11_datastyle  = background:lightgreen
| 12_label      = 12 A Header
| 12_data       = ---
| 13_label      = 13 A Label only
| 14_data       = 14 Some data only that expands across both columns
| 14_datastyle  =background:lightgreen; font-style:italic; border: 1px solid red
}}