Difference between revisions of "Template:Infobox"

From
Jump to: navigation, search
m (1 revision imported: Wikipedia Infobox template.)
(Replaced wikitext with simpler HTML version.)
Line 1: Line 1:
{{Infobox
+
<div class="infobox">
|name        = Infobox
+
<div class="infobox-title">{{{title|{{PAGENAME}}}}}</div>{{#if:{{{image|}}}|
|bodystyle    =  
+
<div class="infobox-image">[[File:{{{image}}}|300px]]</div>}}
 
+
<table>{{#if:{{{param1|}}}|<tr>
|titlestyle  =
+
    <th>Parameter 1</th>
|abovestyle  = background:#cfc;
+
    <td>{{{param1}}}</td>
|subheaderstyle =
+
</tr>}}{{#if:{{{param2|}}}|<tr>
|title        = Test Infobox
+
    <th>Parameter 2</th>
|above        = Above text
+
    <td>{{{param2}}}</td>
|subheader    = Subheader above image
+
</tr>}}{{#if:{{{param3|}}}|<tr>
|subheader2  = Second subheader
+
    <th>Parameter 3</th>
 
+
    <td>{{{param3}}}</td>
|imagestyle  =
+
</tr>}}{{#if:{{{param4|}}}|<tr>
|captionstyle =  
+
    <th>Parameter 4</th>
image     = [[File:Example-serious.jpg|200px|alt=Example alt text]]
+
    <td>{{{param4}}}</td>
|caption      = Caption displayed below Example-serious.jpg
+
</tr>}}{{#if:{{{param5|}}}|<tr>
 
+
    <th>Parameter 5</th>
|headerstyle  = background:#ccf;
+
    <td>{{{param5}}}</td>
|labelstyle  = background:#ddf;
+
</tr>}}</table>
|datastyle    =
+
</div>
 
 
|header1 = Header defined alone
 
| label1 =
 
| data1 =
 
|header2 =
 
| label2 = Label defined alone does not display (needs data, or is suppressed)
 
| data2 =
 
|header3 =
 
| label3 =
 
|  data3 = Data defined alone
 
|header4 = All three defined (header, label, data, all with same number)
 
| label4 = does not display (same number as a header)
 
|  data4 = does not display (same number as a header)
 
|header5 =
 
| label5 = Label and data defined (label)
 
| data5 = Label and data defined (data)
 
 
 
|belowstyle = background:#ddf;
 
|below      = Below text
 
}}
 

Revision as of 06:39, 19 August 2020

Infobox