Template:Infobox: Difference between revisions
imported>Chris Day No edit summary |
imported>Robert A. Estremo (expand to 50 rows) |
||
(15 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{| class="infobox" | <includeonly>{| class="infobox" {{#if:{{{style|}}} | style="{{{style}}}"}} | ||
|- | |- | ||
{{#if:{{{title|}}} | ! colspan="2" style=" | {{#if:{{{title|}}} | ! colspan="2" class="caption" style="width:auto; {{{titlestyle|}}}" {{!}} {{{title}}} }} | ||
|- | |- | ||
{{#if:{{{subtitle|}}} | ! colspan="2" style="text-align:center; font-weight:bold;" {{!}} {{{subtitle}}} }} | {{#if:{{{subtitle|}}} | ! colspan="2" style="text-align:center; font-weight:bold; {{{subtitlestyle|}}}" {{!}} {{{subtitle}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{1_label|}}} | data = {{{1_data|}}} | labelstyle = {{{1_labelstyle|}}} | datastyle = {{{1_datastyle|}}} }} | {{Infobox/row | label = {{{1_label|}}} | data = {{{1_data|}}} | labelstyle = {{{labelstyle|}}} {{{1_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{1_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{2_label|}}} | data = {{{2_data|}}} | labelstyle = {{{2_labelstyle|}}} | datastyle = {{{2_datastyle|}}} }} | {{Infobox/row | label = {{{2_label|}}} | data = {{{2_data|}}} | labelstyle = {{{labelstyle|}}} {{{2_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{2_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{3_label|}}} | data = {{{3_data|}}} | labelstyle = {{{3_labelstyle|}}} | datastyle = {{{3_datastyle|}}} }} | {{Infobox/row | label = {{{3_label|}}} | data = {{{3_data|}}} | labelstyle = {{{labelstyle|}}} {{{3_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{3_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{4_label|}}} | data = {{{4_data|}}} | labelstyle = {{{4_labelstyle|}}} | datastyle = {{{4_datastyle|}}} }} | {{Infobox/row | label = {{{4_label|}}} | data = {{{4_data|}}} | labelstyle = {{{labelstyle|}}} {{{4_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{4_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{5_label|}}} | data = {{{5_data|}}} | labelstyle = {{{5_labelstyle|}}} | datastyle = {{{5_datastyle|}}} }} | {{Infobox/row | label = {{{5_label|}}} | data = {{{5_data|}}} | labelstyle = {{{labelstyle|}}} {{{5_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{5_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{6_label|}}} | data = {{{6_data|}}} | labelstyle = {{{6_labelstyle|}}} | datastyle = {{{6_datastyle|}}} }} | {{Infobox/row | label = {{{6_label|}}} | data = {{{6_data|}}} | labelstyle = {{{labelstyle|}}} {{{6_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{6_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{7_label|}}} | data = {{{7_data|}}} | labelstyle = {{{7_labelstyle|}}} | datastyle = {{{7_datastyle|}}} }} | {{Infobox/row | label = {{{7_label|}}} | data = {{{7_data|}}} | labelstyle = {{{labelstyle|}}} {{{7_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{7_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{8_label|}}} | data = {{{8_data|}}} | labelstyle = {{{8_labelstyle|}}} | datastyle = {{{8_datastyle|}}} }} | {{Infobox/row | label = {{{8_label|}}} | data = {{{8_data|}}} | labelstyle = {{{labelstyle|}}} {{{8_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{8_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{9_label|}}} | data = {{{9_data|}}} | labelstyle = {{{9_labelstyle|}}} | datastyle = {{{9_datastyle|}}} }} | {{Infobox/row | label = {{{9_label|}}} | data = {{{9_data|}}} | labelstyle = {{{labelstyle|}}} {{{9_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{9_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{10_label|}}} | data = {{{10_data|}}} | labelstyle = {{{10_labelstyle|}}} | datastyle = {{{10_datastyle|}}} }} | {{Infobox/row | label = {{{10_label|}}} | data = {{{10_data|}}} | labelstyle = {{{labelstyle|}}} {{{10_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{10_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{11_label|}}} | data = {{{11_data|}}} | labelstyle = {{{11_labelstyle|}}} | datastyle = {{{11_datastyle|}}} }} | {{Infobox/row | label = {{{11_label|}}} | data = {{{11_data|}}} | labelstyle = {{{labelstyle|}}} {{{11_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{11_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{12_label|}}} | data = {{{12_data|}}} | labelstyle = {{{12_labelstyle|}}} | datastyle = {{{12_datastyle|}}} }} | {{Infobox/row | label = {{{12_label|}}} | data = {{{12_data|}}} | labelstyle = {{{labelstyle|}}} {{{12_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{12_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{13_label|}}} | data = {{{13_data|}}} | labelstyle = {{{13_labelstyle|}}} | datastyle = {{{13_datastyle|}}} }} | {{Infobox/row | label = {{{13_label|}}} | data = {{{13_data|}}} | labelstyle = {{{labelstyle|}}} {{{13_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{13_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{14_label|}}} | data = {{{14_data|}}} | labelstyle = {{{14_labelstyle|}}} | datastyle = {{{14_datastyle|}}} }} | {{Infobox/row | label = {{{14_label|}}} | data = {{{14_data|}}} | labelstyle = {{{labelstyle|}}} {{{14_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{14_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{15_label|}}} | data = {{{15_data|}}} | labelstyle = {{{15_labelstyle|}}} | datastyle = {{{15_datastyle|}}} }} | {{Infobox/row | label = {{{15_label|}}} | data = {{{15_data|}}} | labelstyle = {{{labelstyle|}}} {{{15_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{15_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{16_label|}}} | data = {{{16_data|}}} | labelstyle = {{{16_labelstyle|}}} | datastyle = {{{16_datastyle|}}} }} | {{Infobox/row | label = {{{16_label|}}} | data = {{{16_data|}}} | labelstyle = {{{labelstyle|}}} {{{16_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{16_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{17_label|}}} | data = {{{17_data|}}} | labelstyle = {{{17_labelstyle|}}} | datastyle = {{{17_datastyle|}}} }} | {{Infobox/row | label = {{{17_label|}}} | data = {{{17_data|}}} | labelstyle = {{{labelstyle|}}} {{{17_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{17_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{18_label|}}} | data = {{{18_data|}}} | labelstyle = {{{18_labelstyle|}}} | datastyle = {{{18_datastyle|}}} }} | {{Infobox/row | label = {{{18_label|}}} | data = {{{18_data|}}} | labelstyle = {{{labelstyle|}}} {{{18_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{18_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{19_label|}}} | data = {{{19_data|}}} | labelstyle = {{{19_labelstyle|}}} | datastyle = {{{19_datastyle|}}} }} | {{Infobox/row | label = {{{19_label|}}} | data = {{{19_data|}}} | labelstyle = {{{labelstyle|}}} {{{19_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{19_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{20_label|}}} | data = {{{20_data|}}} | labelstyle = {{{20_labelstyle|}}} | datastyle = {{{20_datastyle|}}} }} | {{Infobox/row | label = {{{20_label|}}} | data = {{{20_data|}}} | labelstyle = {{{labelstyle|}}} {{{20_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{20_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{21_label|}}} | data = {{{21_data|}}} | labelstyle = {{{21_labelstyle|}}} | datastyle = {{{21_datastyle|}}} }} | {{Infobox/row | label = {{{21_label|}}} | data = {{{21_data|}}} | labelstyle = {{{labelstyle|}}} {{{21_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{21_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{22_label|}}} | data = {{{22_data|}}} | labelstyle = {{{22_labelstyle|}}} | datastyle = {{{22_datastyle|}}} }} | {{Infobox/row | label = {{{22_label|}}} | data = {{{22_data|}}} | labelstyle = {{{labelstyle|}}} {{{22_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{22_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{23_label|}}} | data = {{{23_data|}}} | labelstyle = {{{23_labelstyle|}}} | datastyle = {{{23_datastyle|}}} }} | {{Infobox/row | label = {{{23_label|}}} | data = {{{23_data|}}} | labelstyle = {{{labelstyle|}}} {{{23_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{23_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{24_label|}}} | data = {{{24_data|}}} | labelstyle = {{{24_labelstyle|}}} | datastyle = {{{24_datastyle|}}} }} | {{Infobox/row | label = {{{24_label|}}} | data = {{{24_data|}}} | labelstyle = {{{labelstyle|}}} {{{24_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{24_datastyle|}}} }} | ||
|- | |- | ||
{{Infobox/row | label = {{{25_label|}}} | data = {{{25_data|}}} | labelstyle = {{{25_labelstyle|}}} | datastyle = {{{25_datastyle|}}} }} | {{Infobox/row | label = {{{25_label|}}} | data = {{{25_data|}}} | labelstyle = {{{labelstyle|}}} {{{25_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{25_datastyle|}}} }} | ||
|- | |- | ||
|} | {{Infobox/row | label = {{{26_label|}}} | data = {{{26_data|}}} | labelstyle = {{{labelstyle|}}} {{{26_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{26_datastyle|}}} }} | ||
|- | |||
{{Infobox/row | label = {{{27_label|}}} | data = {{{27_data|}}} | labelstyle = {{{labelstyle|}}} {{{27_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{27_datastyle|}}} }} | |||
|- | |||
{{Infobox/row | label = {{{28_label|}}} | data = {{{28_data|}}} | labelstyle = {{{labelstyle|}}} {{{28_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{28_datastyle|}}} }} | |||
|- | |||
{{Infobox/row | label = {{{29_label|}}} | data = {{{29_data|}}} | labelstyle = {{{labelstyle|}}} {{{29_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{29_datastyle|}}} }} | |||
|- | |||
{{Infobox/row | label = {{{30_label|}}} | data = {{{30_data|}}} | labelstyle = {{{labelstyle|}}} {{{30_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{30_datastyle|}}} }} | |||
|- | |||
{{Infobox/row | label = {{{31_label|}}} | data = {{{31_data|}}} | labelstyle = {{{labelstyle|}}} {{{31_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{31_datastyle|}}} }} | |||
{{Infobox | |- | ||
| | {{Infobox/row | label = {{{32_label|}}} | data = {{{32_data|}}} | labelstyle = {{{labelstyle|}}} {{{32_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{32_datastyle|}}} }} | ||
| | |- | ||
| | {{Infobox/row | label = {{{33_label|}}} | data = {{{33_data|}}} | labelstyle = {{{labelstyle|}}} {{{33_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{33_datastyle|}}} }} | ||
| | |- | ||
| | {{Infobox/row | label = {{{34_label|}}} | data = {{{34_data|}}} | labelstyle = {{{labelstyle|}}} {{{34_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{34_datastyle|}}} }} | ||
| | |- | ||
| | {{Infobox/row | label = {{{35_label|}}} | data = {{{35_data|}}} | labelstyle = {{{labelstyle|}}} {{{35_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{35_datastyle|}}} }} | ||
| | |- | ||
| | {{Infobox/row | label = {{{36_label|}}} | data = {{{36_data|}}} | labelstyle = {{{labelstyle|}}} {{{36_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{36_datastyle|}}} }} | ||
| | |- | ||
| | {{Infobox/row | label = {{{37_label|}}} | data = {{{37_data|}}} | labelstyle = {{{labelstyle|}}} {{{37_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{37_datastyle|}}} }} | ||
| | |- | ||
| | {{Infobox/row | label = {{{38_label|}}} | data = {{{38_data|}}} | labelstyle = {{{labelstyle|}}} {{{38_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{38_datastyle|}}} }} | ||
| | |- | ||
| | {{Infobox/row | label = {{{39_label|}}} | data = {{{39_data|}}} | labelstyle = {{{labelstyle|}}} {{{39_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{39_datastyle|}}} }} | ||
| | |- | ||
| | {{Infobox/row | label = {{{40_label|}}} | data = {{{40_data|}}} | labelstyle = {{{labelstyle|}}} {{{40_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{40_datastyle|}}} }} | ||
| | |- | ||
| | {{Infobox/row | label = {{{41_label|}}} | data = {{{41_data|}}} | labelstyle = {{{labelstyle|}}} {{{41_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{41_datastyle|}}} }} | ||
| | |- | ||
| | {{Infobox/row | label = {{{42_label|}}} | data = {{{42_data|}}} | labelstyle = {{{labelstyle|}}} {{{42_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{42_datastyle|}}} }} | ||
| | |- | ||
| | {{Infobox/row | label = {{{43_label|}}} | data = {{{43_data|}}} | labelstyle = {{{labelstyle|}}} {{{43_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{43_datastyle|}}} }} | ||
| | |- | ||
| | {{Infobox/row | label = {{{44_label|}}} | data = {{{44_data|}}} | labelstyle = {{{labelstyle|}}} {{{44_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{44_datastyle|}}} }} | ||
| | |- | ||
| | {{Infobox/row | label = {{{45_label|}}} | data = {{{45_data|}}} | labelstyle = {{{labelstyle|}}} {{{45_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{45_datastyle|}}} }} | ||
| | |- | ||
| | {{Infobox/row | label = {{{46_label|}}} | data = {{{46_data|}}} | labelstyle = {{{labelstyle|}}} {{{46_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{46_datastyle|}}} }} | ||
}} | |- | ||
{{Infobox/row | label = {{{47_label|}}} | data = {{{47_data|}}} | labelstyle = {{{labelstyle|}}} {{{47_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{47_datastyle|}}} }} | |||
|- | |||
{{Infobox/row | label = {{{48_label|}}} | data = {{{48_data|}}} | labelstyle = {{{labelstyle|}}} {{{48_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{48_datastyle|}}} }} | |||
|- | |||
{{Infobox | {{Infobox/row | label = {{{49_label|}}} | data = {{{49_data|}}} | labelstyle = {{{labelstyle|}}} {{{49_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{49_datastyle|}}} }} | ||
| | |- | ||
| | {{Infobox/row | label = {{{50_label|}}} | data = {{{50_data|}}} | labelstyle = {{{labelstyle|}}} {{{50_labelstyle|}}} | datastyle = {{{datastyle|}}} {{{50_datastyle|}}} }} | ||
| | |- | ||
| | |} {{#ifeq:{{NAMESPACE}}:{{PAGENAME}}|Template:{{BASEPAGENAME}}| {{#ifeq:{{BASEPAGENAME}}|Infobox|| [[Category:Templates/Infoboxes]] }} }}</includeonly><noinclude>{{TlDoc}}</noinclude> | ||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| | |||
}} | |||
</ | |||
</noinclude> |
Latest revision as of 17:39, 21 August 2013
This template is mainly intended to be used for the creation of other infoboxes, and all infoboxes should use it. See {{Infobox Software}} for an example. It can, however, equally well be used to create one-off infoboxes on individual articles.
To create a new infobox template, enter its name in the box below, after Template:Infobox_, and then click the Create Infobox Template button.
Infobox names should be in Title Case, where each word starts with a capital letter.
Then follow the instructions on the edit page.
After you have created your template, click the Create Documentation link on the new template page, and follow the instructions to document your new template.
Then, please add your template to CZ:Templates, in the relevant section.
Infoboxes based on this template will be automatically added to Category:Templates/Infoboxes.
Usage
An infobox consists of a title, an optional subtitle, and several rows of data, each consisting of a label and a data cell. Examples can be seen below.
The following parameters can be used in the creation of infoboxes. Both are optional, but the title should normally be specified.
- title
- Defines the title for the infobox.
- subtitle
- Defines the subtitle for the infobox.
Each row in the infobox can be defined using a combination of the following parameters, replacing the # by the number of the row (the row number is necessary for technical reasons; it will not be shown in the infobox). These parameters are all optional, though it is clearly pointless to create an infobox with no data whatsoever.
It is possible to create infoboxes with up to 50 rows, though this parameter can easily be changed if need be.
- #_label
- The label for the row.
- If this parameter is blank or not defined, the label will be hidden and the data cell will occupy the full width of the row.
- A full-width label, or header, can be made by setting the data parameter for the same row to three hyphens ( --- ).
- #_data
- The data for the row.
- If this parameter is blank or not defined, the entire row will be hidden, including the label.
- This feature can be taken advantage of in infoboxes based on this template to make their own parameters optional, by defining them as follows :
1_data = {{{param|}}}
. - A full-width data row, with no label, can be shown simply by leaving the label parameter for the same row blank or not defining it.
The following optional parameters allow CSS styles to be applied to the infobox. Each style parameter should end with a semicolon ( ; ).
- style
- CSS which applies to the entire infobox.
- titlestyle
- CSS which applies to the title.
- subtitlestyle
- CSS which applies to the subtitle.
- labelstyle
- CSS which applies to every label or header in the infobox.
- datastyle
- CSS which applies to every data cell in the infobox.
- #_labelstyle
- CSS which only applies to the label with the same number. This overrides the general labeltitle parameter.
- #_datastyle
- CSS which only applies to the data cell with the same number. This overrides the general datatitle parameter.
Examples
The following example illustrates the basic syntax for the creation of a simple, standard, infobox.
This is the title | |
---|---|
Row 1 Label | Row 1 Data |
Row 2 Label | Row 2 Data |
{{Infobox | title = This is the title | 1_label = Row 1 Label | 1_data = Row 1 Data | 2_label = Row 2 Label | 2_data = Row 2 Data }}
The following more complex example illustrates the usage of styles, headers, and full-width data rows.
This is the title | |
---|---|
This is the subtitle | |
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 | |
7 A Header | |
8 A Label | 8 Some Data |
9 Another Label | 9 Some more Data |
10 Another Label | 10 Some more Data |
11 A Header | |
12 Some data only that expands across both columns |
{{Infobox | style = background:#ccf; | labelstyle = background:#99f; color:#00f; | datastyle = background:#eef; color:#009; | title = This is the title | titlestyle = color:#f00; | subtitle = This is the subtitle | subtitlestyle = color:#00f; | 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 (doesn't work...) | 6_data = 6 Some data only that expands across both columns | 7_label = 7 A Header | 7_labelstyle = background:lightgrey; | 7_data = --- | 8_label = 8 A Label | 8_labelstyle = background:lightblue; font-style:italic; | 8_data = 8 Some Data | 9_label = 9 Another Label | 9_data = 9 Some more Data | 9_datastyle = background:lightgreen; font-style:italic; | 10_label = 10 Another Label | 10_labelstyle = background:lightblue; | 10_data = 10 Some more Data | 10_datastyle = background:lightgreen; | 11_label = 11 A Header | 11_data = --- | 12_data = 12 Some data only that expands across both columns | 12_datastyle = background:lightgreen; font-style:italic; border:1px solid red; }}