Template:Infobox

(Difference between revisions)

m (Changed protection level for "Template:Infobox" ([move=sysop] (indefinite)))
Line 1: Line 1:
<noinclude><!-- Specify row colours at "Template:Rowbg" and "Template:Rowbg-alt" -->
+
{{Auto|Type=Standard}}
  
 
To use this template, type the following into a page:
 
To use this template, type the following into a page:
  
<pre>{{Infobox
+
<pre>
 +
{{Infobox
  
|title =
+
|title = Example Infobox
|image = [[Image:*.png|300px]]
+
|image = [[File:*.png|300px]]
 
|imagecaption =
 
|imagecaption =
  
|label1 =
+
|label1 :: data1
|data1 =
+
|label2 :: data2
|label2 =
+
|label3 :: data3
|data2 =
+
|label4 :: data4
  
 
}}
 
}}
 
</pre>
 
</pre>
  
All initial elements are optional, but at least one must be specified for each "row". This template supports up to forty different entries.
+
This template supports up to fourty different, optional entries.
 +
 
 +
{{Infobox
 +
|title = Example Infobox
 +
|image = [[Image:*.png|300px]]
 +
|imagecaption =
 +
 
 +
|label1 :: data1
 +
|label2 :: data2
 +
|label3 :: data3
 +
|label4 :: data4
 +
}}
 +
 
  
<table style="float: right; width: 300px; font-size: 90%; text-align: left; padding-left: 1em; margin-bottom: 1em;" cellspacing="0" cellpadding="3">
+
<onlyinclude><includeonly>
<!-- Header --><tr style="background:#{{Rowbg}};"><th colspan="2" style="font-size:110%; text-align: center;"><i>Title</i></th></tr><tr style="background:#{{Rowbg}};"><td colspan="2" style="text-align: center;">'''Image'''<br />Image caption</tr>
+
<table style="float: right; width: 300px; font-size: 90%; text-align: left; margin: 0 0 1em 1em;" cellspacing="0" cellpadding="3"><!-- Header --><tr style="background:{{Rowbg}}"><th colspan="2" style="font-size:110%; font-style:italic; text-align: center;">{{#if: {{{title|}}} | {{{title}}} | {{PageName}}}}</th></tr><tr style="background:{{Rowbg}}"><td colspan="2" style="text-align: center;">{{{image|}}}{{#if: {{{imagecaption|}}} | <br />{{{imagecaption|}}}}}</tr>
<!-- Row 1 --><tr style="background:#{{Rowbg}};"><td><b>Label 1</b></td><td>Data 1</td></tr>
+
{{Infobox/Row|L={{{label1|}}}|D={{{data1|}}}|{{{1|}}}|Rowbg}}{{Infobox/Row|L={{{label2|}}}|D={{{data2|}}}|{{{2|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label3|}}}|D={{{data3|}}}|{{{3|}}}|Rowbg}}{{Infobox/Row|L={{{label4|}}}|D={{{data4|}}}|{{{4|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label5|}}}|D={{{data5|}}}|{{{5|}}}|Rowbg}}{{Infobox/Row|L={{{label6|}}}|D={{{data6|}}}|{{{6|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label7|}}}|D={{{data7|}}}|{{{7|}}}|Rowbg}}{{Infobox/Row|L={{{label8|}}}|D={{{data8|}}}|{{{8|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label9|}}}|D={{{data9|}}}|{{{9|}}}|Rowbg}}{{Infobox/Row|L={{{label10|}}}|D={{{data10|}}}|{{{10|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label11|}}}|D={{{data11|}}}|{{{11|}}}|Rowbg}}{{Infobox/Row|L={{{label12|}}}|D={{{data12|}}}|{{{12|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label13|}}}|D={{{data13|}}}|{{{13|}}}|Rowbg}}{{Infobox/Row|L={{{label14|}}}|D={{{data14|}}}|{{{14|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label15|}}}|D={{{data15|}}}|{{{15|}}}|Rowbg}}{{Infobox/Row|L={{{label16|}}}|D={{{data16|}}}|{{{16|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label17|}}}|D={{{data17|}}}|{{{17|}}}|Rowbg}}{{Infobox/Row|L={{{label18|}}}|D={{{data18|}}}|{{{18|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label19|}}}|D={{{data19|}}}|{{{19|}}}|Rowbg}}{{Infobox/Row|L={{{label20|}}}|D={{{data20|}}}|{{{20|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label21|}}}|D={{{data21|}}}|{{{21|}}}|Rowbg}}{{Infobox/Row|L={{{label22|}}}|D={{{data22|}}}|{{{22|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label23|}}}|D={{{data23|}}}|{{{23|}}}|Rowbg}}{{Infobox/Row|L={{{label24|}}}|D={{{data24|}}}|{{{24|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label25|}}}|D={{{data25|}}}|{{{25|}}}|Rowbg}}{{Infobox/Row|L={{{label26|}}}|D={{{data26|}}}|{{{26|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label27|}}}|D={{{data27|}}}|{{{27|}}}|Rowbg}}{{Infobox/Row|L={{{label28|}}}|D={{{data28|}}}|{{{28|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label29|}}}|D={{{data29|}}}|{{{29|}}}|Rowbg}}{{Infobox/Row|L={{{label30|}}}|D={{{data30|}}}|{{{30|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label31|}}}|D={{{data31|}}}|{{{31|}}}|Rowbg}}{{Infobox/Row|L={{{label32|}}}|D={{{data32|}}}|{{{32|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label33|}}}|D={{{data33|}}}|{{{33|}}}|Rowbg}}{{Infobox/Row|L={{{label34|}}}|D={{{data34|}}}|{{{34|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label35|}}}|D={{{data35|}}}|{{{35|}}}|Rowbg}}{{Infobox/Row|L={{{label36|}}}|D={{{data36|}}}|{{{36|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label37|}}}|D={{{data37|}}}|{{{37|}}}|Rowbg}}{{Infobox/Row|L={{{label38|}}}|D={{{data38|}}}|{{{38|}}}|Rowbg-alt}}{{Infobox/Row|L={{{label39|}}}|D={{{data39|}}}|{{{39|}}}|Rowbg}}{{Infobox/Row|L={{{label40|}}}|D={{{data40|}}}|{{{40|}}}|Rowbg-alt}}
<!-- Row 2 --><tr style="background:#{{Rowbg-alt}};"><td><b>Label 2</b></td><td>Data 2</td></tr>
+
<!-- Row 3 --><tr style="background:#{{Rowbg}};"><td><b>Label 3</b></td><td>Data 3</td></tr>
+
<!-- Row 4 --><tr style="background:#{{Rowbg-alt}};"><td><b>Label 4</b></td><td>Data 4</td></tr>
+
 
</table>
 
</table>
</noinclude><includeonly><table style="float: right; width: 300px; font-size: 90%; text-align: left; padding-left: 1em; margin-bottom: 1em;" cellspacing="0" cellpadding="3"><!-- Header --><tr style="background:#{{Rowbg}}"><th colspan="2" style="font-size:110%; text-align: center;"><i>{{{title}}}</i></th></tr><tr style="background:#{{Rowbg}}"><td colspan="2" style="text-align: center;">{{{image}}}{{{imagecaption}}}</tr>{{ #if: {{{label1|}}} | <!-- Row 1 --><tr style="background:#{{Rowbg}}"><td><b>{{{label1}}}</b></td><td>{{{data1}}}</td></tr> }}{{ #if: {{{label2|}}} | <!-- Row 2 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label2}}}</b></td><td>{{{data2}}}</td></tr> }}{{ #if: {{{label3|}}} | <!-- Row 3 --><tr style="background:#{{Rowbg}}"><td><b>{{{label3}}}</b></td><td>{{{data3}}}</td></tr> }}{{ #if: {{{label4|}}} | <!-- Row 4 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label4}}}</b></td><td>{{{data4}}}</td></tr> }}{{ #if: {{{label5|}}} | <!-- Row 5 --><tr style="background:#{{Rowbg}}"><td><b>{{{label5}}}</b></td><td>{{{data5}}}</td></tr> }}{{ #if: {{{label6|}}} | <!-- Row 6 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label6}}}</b></td><td>{{{data6}}}</td></tr> }}{{ #if: {{{label7|}}} | <!-- Row 7 --><tr style="background:#{{Rowbg}}"><td><b>{{{label7}}}</b></td><td>{{{data7}}}</td></tr> }}{{ #if: {{{label8|}}} | <!-- Row 8 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label8}}}</b></td><td>{{{data8}}}</td></tr> }}{{ #if: {{{label9|}}} | <!-- Row 9 --><tr style="background:#{{Rowbg}}"><td><b>{{{label9}}}</b></td><td>{{{data9}}}</td></tr> }}{{ #if: {{{label10|}}} | <!-- Row 10 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label10}}}</b></td><td>{{{data10}}}</td></tr> }}{{ #if: {{{label11|}}} | <!-- Row 11 --><tr style="background:#{{Rowbg}}"><td><b>{{{label11}}}</b></td><td>{{{data11}}}</td></tr> }}{{ #if: {{{label12|}}} | <!-- Row 12 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label12}}}</b></td><td>{{{data12}}}</td></tr> }}{{ #if: {{{label13|}}} | <!-- Row 13 --><tr style="background:#{{Rowbg}}"><td><b>{{{label13}}}</b></td><td>{{{data13}}}</td></tr> }}{{ #if: {{{label14|}}} | <!-- Row 14 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label14}}}</b></td><td>{{{data14}}}</td></tr> }}{{ #if: {{{label15|}}} | <!-- Row 15 --><tr style="background:#{{Rowbg}}"><td><b>{{{label15}}}</b></td><td>{{{data15}}}</td></tr> }}{{ #if: {{{label16|}}} | <!-- Row 16 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label16}}}</b></td><td>{{{data16}}}</td></tr> }}{{ #if: {{{label17|}}} | <!-- Row 17 --><tr style="background:#{{Rowbg}}"><td><b>{{{label17}}}</b></td><td>{{{data17}}}</td></tr> }}{{ #if: {{{label18|}}} | <!-- Row 18 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label18}}}</b></td><td>{{{data18}}}</td></tr> }}{{ #if: {{{label19|}}} | <!-- Row 19 --><tr style="background:#{{Rowbg}}"><td><b>{{{label19}}}</b></td><td>{{{data19}}}</td></tr> }}{{ #if: {{{label20|}}} | <!-- Row 20 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label20}}}</b></td><td>{{{data20}}}</td></tr> }}{{ #if: {{{label21|}}} | <!-- Row 21 --><tr style="background:#{{Rowbg}}"><td><b>{{{label21}}}</b></td><td>{{{data21}}}</td></tr> }}{{ #if: {{{label22|}}} | <!-- Row 22 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label22}}}</b></td><td>{{{data22}}}</td></tr> }}{{ #if: {{{label23|}}} | <!-- Row 23 --><tr style="background:#{{Rowbg}}"><td><b>{{{label23}}}</b></td><td>{{{data23}}}</td></tr> }}{{ #if: {{{label24|}}} | <!-- Row 24 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label24}}}</b></td><td>{{{data24}}}</td></tr> }}{{ #if: {{{label25|}}} | <!-- Row 25 --><tr style="background:#{{Rowbg}}"><td><b>{{{label25}}}</b></td><td>{{{data25}}}</td></tr> }}{{ #if: {{{label26|}}} | <!-- Row 26 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label26}}}</b></td><td>{{{data26}}}</td></tr> }}{{ #if: {{{label27|}}} | <!-- Row 27 --><tr style="background:#{{Rowbg}}"><td><b>{{{label27}}}</b></td><td>{{{data27}}}</td></tr> }}{{ #if: {{{label28|}}} | <!-- Row 28 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label28}}}</b></td><td>{{{data28}}}</td></tr> }}{{ #if: {{{label29|}}} | <!-- Row 29 --><tr style="background:#{{Rowbg}}"><td><b>{{{label29}}}</b></td><td>{{{data29}}}</td></tr> }}{{ #if: {{{label30|}}} | <!-- Row 30 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label30}}}</b></td><td>{{{data30}}}</td></tr> }}{{ #if: {{{label31|}}} | <!-- Row 31 --><tr style="background:#{{Rowbg}}"><td><b>{{{label31}}}</b></td><td>{{{data31}}}</td></tr> }}{{ #if: {{{label32|}}} | <!-- Row 32 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label32}}}</b></td><td>{{{data32}}}</td></tr> }}{{ #if: {{{label33|}}} | <!-- Row 33 --><tr style="background:#{{Rowbg}}"><td><b>{{{label33}}}</b></td><td>{{{data33}}}</td></tr> }}{{ #if: {{{label34|}}} | <!-- Row 34 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label34}}}</b></td><td>{{{data34}}}</td></tr> }}{{ #if: {{{label35|}}} | <!-- Row 35 --><tr style="background:#{{Rowbg}}"><td><b>{{{label35}}}</b></td><td>{{{data35}}}</td></tr> }}{{ #if: {{{label36|}}} | <!-- Row 36 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label36}}}</b></td><td>{{{data36}}}</td></tr> }}{{ #if: {{{label37|}}} | <!-- Row 37 --><tr style="background:#{{Rowbg}}"><td><b>{{{label37}}}</b></td><td>{{{data37}}}</td></tr> }}{{ #if: {{{label38|}}} | <!-- Row 38 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label38}}}</b></td><td>{{{data38}}}</td></tr> }}{{ #if: {{{label39|}}} | <!-- Row 39 --><tr style="background:#{{Rowbg}}"><td><b>{{{label39}}}</b></td><td>{{{data39}}}</td></tr> }}{{ #if: {{{label40|}}} | <!-- Row 40 --><tr style="background:#{{Rowbg-alt}};"><td><b>{{{label40}}}</b></td><td>{{{data40}}}</td></tr> }}</table></includeonly>
+
</includeonly></onlyinclude>

Revision as of 13:37, 22 March 2010

Template:Auto

To use this template, type the following into a page:

{{Infobox

|title = Example Infobox
|image = [[File:*.png|300px]]
|imagecaption =

|label1 :: data1
|label2 :: data2
|label3 :: data3
|label4 :: data4

}}

This template supports up to fourty different, optional entries.

{{{Icon}}}
label1 :: data1
label2 :: data2
label3 :: data3
label4 data4