Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Infobox Homebrew: Difference between revisions

Template page
(Created page with "<table class="infobox {{{bodyclass|}}}" cellspacing="5" style="width: 22em; text-align: left; font-size: 88%; line-height: 1.5em; {{{bodystyle|}}}"><!-- Header -->{{#if:{{{title...")
 
No edit summary
Line 1: Line 1:
<table class="infobox {{{bodyclass|}}}" cellspacing="5" style="width: 22em; text-align: left; font-size: 88%; line-height: 1.5em; {{{bodystyle|}}}"><!--
{{documentation subpage}}
Header
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. -->
-->{{#if:{{{title|}}}|<tr><td colspan="2" class="{{{titleclass|}}}" style="text-align:center; font-size: 125%; font-weight: bold; {{{titlestyle|}}}">{{{title}}}</td></tr>}}<!--
 
<!--
==Usage==
Subheader
 
-->{{#if:{{{above|}}}|<tr><td colspan="2" class="{{{aboveclass|}}}" style="text-align:center; font-weight: bold; {{{abovestyle|}}}">{{{above}}}</td></tr>}}<!--
This template is intended as a meta-template, that is, a template that's used when constructing other templates. It's not meant for use directly in an article. See [[Help:Infobox]] for information on how to craft infoboxes in general.
Image
 
-->{{#if:{{{image|}}}|<tr><td colspan="2" class="{{{imageclass|}}}" style="text-align:center; {{{imagestyle|}}}"> {{{image}}} {{#if:{{{caption|}}}|<br />
Usage is similar to {{tl|navbox}}, but with an additional distinction. Each row on the table can either be a "header", or it can have a label/data pair, or it can just be a data cell. These are mutually exclusive states so if you define a row to be both a header and a label/data pair, the label/data pair is overridden.
<span style="{{{captionstyle|}}}">{{{caption}}} }}</span></td></tr>}}<!--
 
Row 1
Note that if you want to insert an image elsewhere other than the top of the infobox, or insert other "freeform" data, using a row with just a "data" field allows for that sort of thing.
-->{{#if:{{{header1|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header1|}}}</th></tr>| {{#if:{{{label1|}}}|{{#if:{{{data1|}}}|<tr><th style="{{{labelstyle|}}}">{{{label1|}}}</th><td class="{{{class1|}}}" style="{{{datastyle|}}}">{{{data1|}}}</td></tr>}}|  {{#if:{{{data1|}}}|<tr><td colspan="2" class="{{{class1|}}}" style="text-align:center; {{{datastyle|}}}">{{{data1|}}}</td></tr>}} }} }}<!--
 
  Row 2
===Parameters===
-->{{#if:{{{header2|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header2|}}}</th></tr>| {{#if:{{{label2|}}}|{{#if:{{{data2|}}}|<tr><th style="{{{labelstyle|}}}">{{{label2|}}}</th><td class="{{{class2|}}}" style="{{{datastyle|}}}">{{{data2|}}}</td></tr>}}{{#if:{{{data2|}}}|<tr><td colspan="2" class="{{{class2|}}}" style="text-align:center; {{{datastyle|}}}">{{{data2|}}}</td></tr>}} }} }}<!--
 
  Row 3
====View/discuss/edit links====
-->{{#if:{{{header3|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header3|}}}</th></tr>| {{#if:{{{label3|}}}|{{#if:{{{data3|}}}|<tr><th style="{{{labelstyle|}}}">{{{label3|}}}</th><td class="{{{class3|}}}" style="{{{datastyle|}}}">{{{data3|}}}</td></tr>}}{{#if:{{{data3|}}}|<tr><td colspan="2" class="{{{class3|}}}" style="text-align:center; {{{datastyle|}}}">{{{data3|}}}</td></tr>}} }} }}<!--
;name : The template page name that the "view/discuss/edit" links should point to. You can use <nowiki>{{subst:PAGENAME}}</nowiki>. If this parameter is omitted the view/discuss/edit links will not be displayed.
Row 4
 
-->{{#if:{{{header4|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header4|}}}</th></tr>| {{#if:{{{label4|}}}|{{#if:{{{data4|}}}|<tr><th style="{{{labelstyle|}}}">{{{label4|}}}</th><td class="{{{class4|}}}" style="{{{datastyle|}}}">{{{data4|}}}</td></tr>}}{{#if:{{{data4|}}}|<tr><td colspan="2" class="{{{class4|}}}" style="text-align:center; {{{datastyle|}}}">{{{data4|}}}</td></tr>}} }} }}<!--
====Title====
Row 5
{{Infobox
-->{{#if:{{{header5|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header5|}}}</th></tr>| {{#if:{{{label5|}}}|{{#if:{{{data5|}}}|<tr><th style="{{{labelstyle|}}}">{{{label5|}}}</th><td class="{{{class5|}}}" style="{{{datastyle|}}}">{{{data5|}}}</td></tr>}}{{#if:{{{data5|}}}|<tr><td colspan="2" class="{{{class5|}}}" style="text-align:center; {{{datastyle|}}}">{{{data5|}}}</td></tr>}} }} }}<!--
|title = Text in caption over infobox
  Row 6
|data1 = (the rest of the infobox goes here)
-->{{#if:{{{header6|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header6|}}}</th></tr>| {{#if:{{{label6|}}}|{{#if:{{{data6|}}}|<tr><th style="{{{labelstyle|}}}">{{{label6|}}}</th><td class="{{{class6|}}}" style="{{{datastyle|}}}">{{{data6|}}}</td></tr>}}| {{#if:{{{data6|}}}|<tr><td colspan="2" class="{{{class6|}}}" style="text-align:center; {{{datastyle|}}}">{{{data6|}}}</td></tr>}} }} }}<!--
}}
  Row 7
{{Infobox
-->{{#if:{{{header7|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header7|}}}</th></tr>| {{#if:{{{label7|}}}|{{#if:{{{data7|}}}|<tr><th style="{{{labelstyle|}}}">{{{label7|}}}</th><td class="{{{class7|}}}" style="{{{datastyle|}}}">{{{data7|}}}</td></tr>}}{{#if:{{{data7|}}}|<tr><td colspan="2" class="{{{class7|}}}" style="text-align:center; {{{datastyle|}}}">{{{data7|}}}</td></tr>}} }} }}<!--
|above = Text in uppermost cell of infobox
Row 8
|data1 = (the rest of the infobox goes here)
-->{{#if:{{{header8|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header8|}}}</th></tr>| {{#if:{{{label8|}}}|{{#if:{{{data8|}}}|<tr><th style="{{{labelstyle|}}}">{{{label8|}}}</th><td class="{{{class8|}}}" style="{{{datastyle|}}}">{{{data8|}}}</td></tr>}}|  {{#if:{{{data8|}}}|<tr><td colspan="2" class="{{{class8|}}}" style="text-align:center; {{{datastyle|}}}">{{{data8|}}}</td></tr>}} }} }}<!--
}}
Row 9
 
-->{{#if:{{{header9|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header9|}}}</th></tr>| {{#if:{{{label9|}}}|{{#if:{{{data9|}}}|<tr><th style="{{{labelstyle|}}}">{{{label9|}}}</th><td class="{{{class9|}}}" style="{{{datastyle|}}}">{{{data9|}}}</td></tr>}}|  {{#if:{{{data9|}}}|<tr><td colspan="2" class="{{{class9|}}}" style="text-align:center; {{{datastyle|}}}">{{{data9|}}}</td></tr>}} }} }}<!--
There are two different ways to put a title on an infobox. One contains the title inside the infobox's border, the other puts it on top as a caption. You can use both of them together if you like, or just one or the other, or even neither (though this is not recommended).
Row 10
;title : Text to put in the caption over top of the table.
-->{{#if:{{{header10|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header10|}}}</th></tr>| {{#if:{{{label10|}}}|{{#if:{{{data10|}}}|<tr><th style="{{{labelstyle|}}}">{{{label10|}}}</th><td class="{{{class10|}}}" style="{{{datastyle|}}}">{{{data10|}}}</td></tr>}}|  {{#if:{{{data10|}}}|<tr><td colspan="2" class="{{{class10|}}}" style="text-align:center; {{{datastyle|}}}">{{{data10|}}}</td></tr>}} }} }}<!--
;above : Text to put within the uppermost cell of the table.
Row 11
 
-->{{#if:{{{header11|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header11|}}}</th></tr>| {{#if:{{{label11|}}}|{{#if:{{{data11|}}}|<tr><th style="{{{labelstyle|}}}">{{{label11|}}}</th><td class="{{{class11|}}}" style="{{{datastyle|}}}">{{{data11|}}}</td></tr>}}|  {{#if:{{{data11|}}}|<tr><td colspan="2" class="{{{class11|}}}" style="text-align:center; {{{datastyle|}}}">{{{data11|}}}</td></tr>}} }} }}<!--
====Optional content====
Row 12
; image : An image to display at the top of the template. Use full image syntax, for example <nowiki>[[Image:example.png|200px]]</nowiki>. Image is centered by default.
-->{{#if:{{{header12|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header12|}}}</th></tr>| {{#if:{{{label12|}}}|{{#if:{{{data12|}}}|<tr><th style="{{{labelstyle|}}}">{{{label12|}}}</th><td class="{{{class12|}}}" style="{{{datastyle|}}}">{{{data12|}}}</td></tr>}}|  {{#if:{{{data12|}}}|<tr><td colspan="2" class="{{{class12|}}}" style="text-align:center; {{{datastyle|}}}">{{{data12|}}}</td></tr>}} }} }}<!--
;caption : Text to put underneath the image.
Row 13
;header(n) : Text to use as a header in row n.
-->{{#if:{{{header13|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header13|}}}</th></tr>| {{#if:{{{label13|}}}|{{#if:{{{data13|}}}|<tr><th style="{{{labelstyle|}}}">{{{label13|}}}</th><td class="{{{class13|}}}" style="{{{datastyle|}}}">{{{data13|}}}</td></tr>}}|  {{#if:{{{data13|}}}|<tr><td colspan="2" class="{{{class13|}}}" style="text-align:center; {{{datastyle|}}}">{{{data13|}}}</td></tr>}} }} }}<!--
;label(n): Text to use as a label in row n.
Row 14
;data(n): Text to display as data in row n.
-->{{#if:{{{header14|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header14|}}}</th></tr>| {{#if:{{{label14|}}}|{{#if:{{{data14|}}}|<tr><th style="{{{labelstyle|}}}">{{{label14|}}}</th><td class="{{{class14|}}}" style="{{{datastyle|}}}">{{{data14|}}}</td></tr>}}|  {{#if:{{{data14|}}}|<tr><td colspan="2" class="{{{class14|}}}" style="text-align:center; {{{datastyle|}}}">{{{data14|}}}</td></tr>}} }} }}<!--
;below: Text to put in the bottom cell. The bottom cell is intended for footnotes, see-also, and other such information.
Row 15
 
-->{{#if:{{{header15|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header15|}}}</th></tr>| {{#if:{{{label15|}}}|{{#if:{{{data15|}}}|<tr><th style="{{{labelstyle|}}}">{{{label15|}}}</th><td class="{{{class15|}}}" style="{{{datastyle|}}}">{{{data15|}}}</td></tr>}}|  {{#if:{{{data15|}}}|<tr><td colspan="2" class="{{{class15|}}}" style="text-align:center; {{{datastyle|}}}">{{{data15|}}}</td></tr>}} }} }}<!--
====Optional CSS styling====
Row 16
;bodystyle : Applies to the infobox table as a whole
-->{{#if:{{{header16|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header16|}}}</th></tr>| {{#if:{{{label16|}}}|{{#if:{{{data16|}}}|<tr><th style="{{{labelstyle|}}}">{{{label16|}}}</th><td class="{{{class16|}}}" style="{{{datastyle|}}}">{{{data16|}}}</td></tr>}}|  {{#if:{{{data16|}}}|<tr><td colspan="2" class="{{{class16|}}}" style="text-align:center; {{{datastyle|}}}">{{{data16|}}}</td></tr>}} }} }}<!--
;titlestyle : Applies only to the title caption. Adding a background color is usually inadvisable since the text is rendered "outside" the infobox.
Row 17
;abovestyle : Applies only to the "above" cell at the top. The default style has font-size:large; since this cell is usually used for a title, if you want to use the above cell for regular-sized text include "font-size:medium;" in the abovestyle.
-->{{#if:{{{header17|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header17|}}}</th></tr>| {{#if:{{{label17|}}}|{{#if:{{{data17|}}}|<tr><th style="{{{labelstyle|}}}">{{{label17|}}}</th><td class="{{{class17|}}}" style="{{{datastyle|}}}">{{{data17|}}}</td></tr>}}|  {{#if:{{{data17|}}}|<tr><td colspan="2" class="{{{class17|}}}" style="text-align:center; {{{datastyle|}}}">{{{data17|}}}</td></tr>}} }} }}<!--
;imagestyle : Applies to the cell the image is in. This includes the text of the image caption, but you should set text properties with captionstyle instead of imagestyle in case the caption is moved out of this cell in the future.
Row 18
;captionstyle : Applies to the text of the image caption.
-->{{#if:{{{header18|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header18|}}}</th></tr>| {{#if:{{{label18|}}}|{{#if:{{{data18|}}}|<tr><th style="{{{labelstyle|}}}">{{{label18|}}}</th><td class="{{{class18|}}}" style="{{{datastyle|}}}">{{{data18|}}}</td></tr>}}|  {{#if:{{{data18|}}}|<tr><td colspan="2" class="{{{class18|}}}" style="text-align:center; {{{datastyle|}}}">{{{data18|}}}</td></tr>}} }} }}<!--
;headerstyle : Applies to all header cells
Row 19
;labelstyle : Applies to all label cells
-->{{#if:{{{header19|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header19|}}}</th></tr>| {{#if:{{{label19|}}}|{{#if:{{{data19|}}}|<tr><th style="{{{labelstyle|}}}">{{{label19|}}}</th><td class="{{{class19|}}}" style="{{{datastyle|}}}">{{{data19|}}}</td></tr>}}|  {{#if:{{{data19|}}}|<tr><td colspan="2" class="{{{class19|}}}" style="text-align:center; {{{datastyle|}}}">{{{data19|}}}</td></tr>}} }} }}<!--
;datastyle : Applies to all data cells
Row 20
;belowstyle : Applies only to the below cell
-->{{#if:{{{header20|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header20|}}}</th></tr>| {{#if:{{{label20|}}}|{{#if:{{{data20|}}}|<tr><th style="{{{labelstyle|}}}">{{{label20|}}}</th><td class="{{{class20|}}}" style="{{{datastyle|}}}">{{{data20|}}}</td></tr>}}|  {{#if:{{{data20|}}}|<tr><td colspan="2" class="{{{class20|}}}" style="text-align:center; {{{datastyle|}}}">{{{data20|}}}</td></tr>}} }} }}<!--
 
Row 21
====Microformats====
-->{{#if:{{{header21|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header21|}}}</th></tr>| {{#if:{{{label21|}}}|{{#if:{{{data21|}}}|<tr><th style="{{{labelstyle|}}}">{{{label21|}}}</th><td class="{{{class21|}}}" style="{{{datastyle|}}}">{{{data21|}}}</td></tr>}}|  {{#if:{{{data21|}}}|<tr><td colspan="2" class="{{{class21|}}}" style="text-align:center; {{{datastyle|}}}">{{{data21|}}}</td></tr>}} }} }}<!--
;bodyclass: This parameter is inserted into the "class" attribute for the infobox as a whole
Row 22
;imageclass: This parameter is inserted into the "class" attribute for the image; it is in particular used in conjunction with {{tl|Image class names}}.
-->{{#if:{{{header22|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header22|}}}</th></tr>| {{#if:{{{label22|}}}|{{#if:{{{data22|}}}|<tr><th style="{{{labelstyle|}}}">{{{label22|}}}</th><td class="{{{class22|}}}" style="{{{datastyle|}}}">{{{data22|}}}</td></tr>}}|  {{#if:{{{data22|}}}|<tr><td colspan="2" class="{{{class22|}}}" style="text-align:center; {{{datastyle|}}}">{{{data22|}}}</td></tr>}} }} }}<!--
;class(n): This parameter is inserted into the "class" attribute for the data cell of the specified row. If there's no data cell it has no effect.
Row 23
;titleclass: This parameter is inserted into the "class" attribute for the infobox's title caption.
-->{{#if:{{{header23|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header23|}}}</th></tr>| {{#if:{{{label23|}}}|{{#if:{{{data23|}}}|<tr><th style="{{{labelstyle|}}}">{{{label23|}}}</th><td class="{{{class23|}}}" style="{{{datastyle|}}}">{{{data23|}}}</td></tr>}}|  {{#if:{{{data23|}}}|<tr><td colspan="2" class="{{{class23|}}}" style="text-align:center; {{{datastyle|}}}">{{{data23|}}}</td></tr>}} }} }}<!--
;aboveclass: This parameter is inserted into the "class" attribute for the infobox's above cell.
Row 24
 
-->{{#if:{{{header24|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header24|}}}</th></tr>| {{#if:{{{label24|}}}|{{#if:{{{data24|}}}|<tr><th style="{{{labelstyle|}}}">{{{label24|}}}</th><td class="{{{class24|}}}" style="{{{datastyle|}}}">{{{data24|}}}</td></tr>}}|  {{#if:{{{data24|}}}|<tr><td colspan="2" class="{{{class24|}}}" style="text-align:center; {{{datastyle|}}}">{{{data24|}}}</td></tr>}} }} }}<!--
This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. To flag an infobox as containing hCard information, for example, add the following parameter:
Row 25
 
-->{{#if:{{{header25|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header25|}}}</th></tr>| {{#if:{{{label25|}}}|{{#if:{{{data25|}}}|<tr><th style="{{{labelstyle|}}}">{{{label25|}}}</th><td class="{{{class25|}}}" style="{{{datastyle|}}}">{{{data25|}}}</td></tr>}}|  {{#if:{{{data25|}}}|<tr><td colspan="2" class="{{{class25|}}}" style="text-align:center; {{{datastyle|}}}">{{{data25|}}}</td></tr>}} }} }}<!--
<pre>
Row 26
|bodyclass = vcard
-->{{#if:{{{header26|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header26|}}}</th></tr>| {{#if:{{{label26|}}}|{{#if:{{{data26|}}}|<tr><th style="{{{labelstyle|}}}">{{{label26|}}}</th><td class="{{{class26|}}}" style="{{{datastyle|}}}">{{{data26|}}}</td></tr>}}|  {{#if:{{{data26|}}}|<tr><td colspan="2" class="{{{class26|}}}" style="text-align:center; {{{datastyle|}}}">{{{data26|}}}</td></tr>}} }} }}<!--
</pre>
Row 27
 
-->{{#if:{{{header27|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header27|}}}</th></tr>| {{#if:{{{label27|}}}|{{#if:{{{data27|}}}|<tr><th style="{{{labelstyle|}}}">{{{label27|}}}</th><td class="{{{class27|}}}" style="{{{datastyle|}}}">{{{data27|}}}</td></tr>}}|  {{#if:{{{data27|}}}|<tr><td colspan="2" class="{{{class27|}}}" style="text-align:center; {{{datastyle|}}}">{{{data27|}}}</td></tr>}} }} }}<!--
And for each row containing a data cell that's part of the vcard, add a corresponding class parameter:
Row 28
 
-->{{#if:{{{header28|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header28|}}}</th></tr>| {{#if:{{{label28|}}}|{{#if:{{{data28|}}}|<tr><th style="{{{labelstyle|}}}">{{{label28|}}}</th><td class="{{{class28|}}}" style="{{{datastyle|}}}">{{{data28|}}}</td></tr>}}|  {{#if:{{{data28|}}}|<tr><td colspan="2" class="{{{class28|}}}" style="text-align:center; {{{datastyle|}}}">{{{data28|}}}</td></tr>}} }} }}<!--
<pre>
Row 29
|class1 = fn
-->{{#if:{{{header29|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header29|}}}</th></tr>| {{#if:{{{label29|}}}|{{#if:{{{data29|}}}|<tr><th style="{{{labelstyle|}}}">{{{label29|}}}</th><td class="{{{class29|}}}" style="{{{datastyle|}}}">{{{data29|}}}</td></tr>}}|  {{#if:{{{data29|}}}|<tr><td colspan="2" class="{{{class29|}}}" style="text-align:center; {{{datastyle|}}}">{{{data29|}}}</td></tr>}} }} }}<!--
|class2 = org
Row 30
|class3 = tel
-->{{#if:{{{header30|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header30|}}}</th></tr>| {{#if:{{{label30|}}}|{{#if:{{{data30|}}}|<tr><th style="{{{labelstyle|}}}">{{{label30|}}}</th><td class="{{{class30|}}}" style="{{{datastyle|}}}">{{{data30|}}}</td></tr>}}|  {{#if:{{{data30|}}}|<tr><td colspan="2" class="{{{class30|}}}" style="text-align:center; {{{datastyle|}}}">{{{data30|}}}</td></tr>}} }} }}<!--
</pre>
Row 31
 
-->{{#if:{{{header31|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header31|}}}</th></tr>| {{#if:{{{label31|}}}|{{#if:{{{data31|}}}|<tr><th style="{{{labelstyle|}}}">{{{label31|}}}</th><td class="{{{class31|}}}" style="{{{datastyle|}}}">{{{data31|}}}</td></tr>}}|  {{#if:{{{data31|}}}|<tr><td colspan="2" class="{{{class31|}}}" style="text-align:center; {{{datastyle|}}}">{{{data31|}}}</td></tr>}} }} }}<!--
...and so forth. "above" and "title" can also be given classes, since these are usually used to display the name of the subject of the infobox.
Row 32
 
-->{{#if:{{{header32|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header32|}}}</th></tr>| {{#if:{{{label32|}}}|{{#if:{{{data32|}}}|<tr><th style="{{{labelstyle|}}}">{{{label32|}}}</th><td class="{{{class32|}}}" style="{{{datastyle|}}}">{{{data32|}}}</td></tr>}}|  {{#if:{{{data32|}}}|<tr><td colspan="2" class="{{{class32|}}}" style="text-align:center; {{{datastyle|}}}">{{{data32|}}}</td></tr>}} }} }}<!--
See [[Wikipedia:WikiProject Microformats]] for more information on adding microformat information to Wikipedia, and [http://microformats.org/wiki/Main_Page microformats.org] for more information on microformats in general.
Row 33
 
-->{{#if:{{{header33|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header33|}}}</th></tr>| {{#if:{{{label33|}}}|{{#if:{{{data33|}}}|<tr><th style="{{{labelstyle|}}}">{{{label33|}}}</th><td class="{{{class33|}}}" style="{{{datastyle|}}}">{{{data33|}}}</td></tr>}}|  {{#if:{{{data33|}}}|<tr><td colspan="2" class="{{{class33|}}}" style="text-align:center; {{{datastyle|}}}">{{{data33|}}}</td></tr>}} }} }}<!--
===Making fields optional===
Row 34
A row with a label but no data is not displayed. This allows for the easy creation of optional infobox content rows. To make a row optional use a parameter that defaults to an empty string, like so:
-->{{#if:{{{header34|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header34|}}}</th></tr>| {{#if:{{{label34|}}}|{{#if:{{{data34|}}}|<tr><th style="{{{labelstyle|}}}">{{{label34|}}}</th><td class="{{{class34|}}}" style="{{{datastyle|}}}">{{{data34|}}}</td></tr>}}|  {{#if:{{{data34|}}}|<tr><td colspan="2" class="{{{class34|}}}" style="text-align:center; {{{datastyle|}}}">{{{data34|}}}</td></tr>}} }} }}<!--
 
Row 35
<pre>
-->{{#if:{{{header35|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header35|}}}</th></tr>| {{#if:{{{label35|}}}|{{#if:{{{data35|}}}|<tr><th style="{{{labelstyle|}}}">{{{label35|}}}</th><td class="{{{class35|}}}" style="{{{datastyle|}}}">{{{data35|}}}</td></tr>}}|  {{#if:{{{data35|}}}|<tr><td colspan="2" class="{{{class35|}}}" style="text-align:center; {{{datastyle|}}}">{{{data35|}}}</td></tr>}} }} }}<!--
|label5 = Population
Row 36
|data5  = {{{population|}}}
-->{{#if:{{{header36|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header36|}}}</th></tr>| {{#if:{{{label36|}}}|{{#if:{{{data36|}}}|<tr><th style="{{{labelstyle|}}}">{{{label36|}}}</th><td class="{{{class36|}}}" style="{{{datastyle|}}}">{{{data36|}}}</td></tr>}}|  {{#if:{{{data36|}}}|<tr><td colspan="2" class="{{{class36|}}}" style="text-align:center; {{{datastyle|}}}">{{{data36|}}}</td></tr>}} }} }}<!--
</pre>
Row 37
 
-->{{#if:{{{header37|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header37|}}}</th></tr>| {{#if:{{{label37|}}}|{{#if:{{{data37|}}}|<tr><th style="{{{labelstyle|}}}">{{{label37|}}}</th><td class="{{{class37|}}}" style="{{{datastyle|}}}">{{{data37|}}}</td></tr>}}|  {{#if:{{{data37|}}}|<tr><td colspan="2" class="{{{class37|}}}" style="text-align:center; {{{datastyle|}}}">{{{data37|}}}</td></tr>}} }} }}<!--
This way if an article doesn't define the population parameter in its infobox the row won't be displayed.
Row 38
 
-->{{#if:{{{header38|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header38|}}}</th></tr>| {{#if:{{{label38|}}}|{{#if:{{{data38|}}}|<tr><th style="{{{labelstyle|}}}">{{{label38|}}}</th><td class="{{{class38|}}}" style="{{{datastyle|}}}">{{{data38|}}}</td></tr>}}|  {{#if:{{{data38|}}}|<tr><td colspan="2" class="{{{class38|}}}" style="text-align:center; {{{datastyle|}}}">{{{data38|}}}</td></tr>}} }} }}<!--
For more complex fields with pre-formated contents that would still be present even if the parameter wasn't set, you can wrap it all in an "#if" statement to make the whole thing vanish when the parameter is not used. For instance, the "#if" statement in the following example reads "#if:the parameter ''mass'' has been supplied |then display it, followed by 'kg'":
Row 39
 
-->{{#if:{{{header39|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header39|}}}</th></tr>| {{#if:{{{label39|}}}|{{#if:{{{data39|}}}|<tr><th style="{{{labelstyle|}}}">{{{label39|}}}</th><td class="{{{class39|}}}" style="{{{datastyle|}}}">{{{data39|}}}</td></tr>}}|  {{#if:{{{data39|}}}|<tr><td colspan="2" class="{{{class39|}}}" style="text-align:center; {{{datastyle|}}}">{{{data39|}}}</td></tr>}} }} }}<!--
<pre>
Row 40
|label6 = Mass
-->{{#if:{{{header40|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header40|}}}</th></tr>| {{#if:{{{label40|}}}|{{#if:{{{data40|}}}|<tr><th style="{{{labelstyle|}}}">{{{label40|}}}</th><td class="{{{class40|}}}" style="{{{datastyle|}}}">{{{data40|}}}</td></tr>}}|  {{#if:{{{data40|}}}|<tr><td colspan="2" class="{{{class40|}}}" style="text-align:center; {{{datastyle|}}}">{{{data40|}}}</td></tr>}} }} }}<!--
|data6 = {{#if:{{{mass|}}} |{{{mass}}} kg}}
Row 41
</pre>
-->{{#if:{{{header41|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header41|}}}</th></tr>| {{#if:{{{label41|}}}|{{#if:{{{data41|}}}|<tr><th style="{{{labelstyle|}}}">{{{label41|}}}</th><td class="{{{class41|}}}" style="{{{datastyle|}}}">{{{data41|}}}</td></tr>}}|  {{#if:{{{data41|}}}|<tr><td colspan="2" class="{{{class41|}}}" style="text-align:center; {{{datastyle|}}}">{{{data41|}}}</td></tr>}} }} }}<!--
 
Row 42
For more on #if, see [[meta:ParserFunctions##if:|here]].<br/>
-->{{#if:{{{header42|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header42|}}}</th></tr>| {{#if:{{{label42|}}}|{{#if:{{{data42|}}}|<tr><th style="{{{labelstyle|}}}">{{{label42|}}}</th><td class="{{{class42|}}}" style="{{{datastyle|}}}">{{{data42|}}}</td></tr>}}|  {{#if:{{{data42|}}}|<tr><td colspan="2" class="{{{class42|}}}" style="text-align:center; {{{datastyle|}}}">{{{data42|}}}</td></tr>}} }} }}<!--
You can also make headers optional in a similar way. If you want a header to appear only if one or more of the data fields that fall under it are filled, one could use the following pattern as an example of how to do it:
Row 43
 
-->{{#if:{{{header43|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header43|}}}</th></tr>| {{#if:{{{label43|}}}|{{#if:{{{data43|}}}|<tr><th style="{{{labelstyle|}}}">{{{label43|}}}</th><td class="{{{class43|}}}" style="{{{datastyle|}}}">{{{data43|}}}</td></tr>}}|  {{#if:{{{data43|}}}|<tr><td colspan="2" class="{{{class43|}}}" style="text-align:center; {{{datastyle|}}}">{{{data43|}}}</td></tr>}} }} }}<!--
<pre style="overflow:auto;">
Row 44
{{Infobox
-->{{#if:{{{header44|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header44|}}}</th></tr>| {{#if:{{{label44|}}}|{{#if:{{{data44|}}}|<tr><th style="{{{labelstyle|}}}">{{{label44|}}}</th><td class="{{{class44|}}}" style="{{{datastyle|}}}">{{{data44|}}}</td></tr>}}|  {{#if:{{{data44|}}}|<tr><td colspan="2" class="{{{class44|}}}" style="text-align:center; {{{datastyle|}}}">{{{data44|}}}</td></tr>}} }} }}<!--
|name    = {{subst:PAGENAME}}
Row 45
|title  = Example of an optional header
-->{{#if:{{{header45|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header45|}}}</th></tr>| {{#if:{{{label45|}}}|{{#if:{{{data45|}}}|<tr><th style="{{{labelstyle|}}}">{{{label45|}}}</th><td class="{{{class45|}}}" style="{{{datastyle|}}}">{{{data45|}}}</td></tr>}}|  {{#if:{{{data45|}}}|<tr><td colspan="2" class="{{{class45|}}}" style="text-align:center; {{{datastyle|}}}">{{{data45|}}}</td></tr>}} }} }}<!--
|header1 = {{#if:{{{item_one|}}}{{{item_two|}}}{{{item_three|}}} |Optional header}}
Row 46
|label2 = Item one
-->{{#if:{{{header46|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header46|}}}</th></tr>| {{#if:{{{label46|}}}|{{#if:{{{data46|}}}|<tr><th style="{{{labelstyle|}}}">{{{label46|}}}</th><td class="{{{class46|}}}" style="{{{datastyle|}}}">{{{data46|}}}</td></tr>}}|  {{#if:{{{data46|}}}|<tr><td colspan="2" class="{{{class46|}}}" style="text-align:center; {{{datastyle|}}}">{{{data46|}}}</td></tr>}} }} }}<!--
|data2  = {{{item_one|}}}
Row 47
|label3  = Item two
-->{{#if:{{{header47|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header47|}}}</th></tr>| {{#if:{{{label47|}}}|{{#if:{{{data47|}}}|<tr><th style="{{{labelstyle|}}}">{{{label47|}}}</th><td class="{{{class47|}}}" style="{{{datastyle|}}}">{{{data47|}}}</td></tr>}}|  {{#if:{{{data47|}}}|<tr><td colspan="2" class="{{{class47|}}}" style="text-align:center; {{{datastyle|}}}">{{{data47|}}}</td></tr>}} }} }}<!--
|data3  = {{{item_two|}}}
Row 48
|label4  = Item three
-->{{#if:{{{header48|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header48|}}}</th></tr>| {{#if:{{{label48|}}}|{{#if:{{{data48|}}}|<tr><th style="{{{labelstyle|}}}">{{{label48|}}}</th><td class="{{{class48|}}}" style="{{{datastyle|}}}">{{{data48|}}}</td></tr>}}|  {{#if:{{{data48|}}}|<tr><td colspan="2" class="{{{class48|}}}" style="text-align:center; {{{datastyle|}}}">{{{data48|}}}</td></tr>}} }} }}<!--
|data4  = {{{item_three|}}}
Row 49
}}
-->{{#if:{{{header49|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header49|}}}</th></tr>| {{#if:{{{label49|}}}|{{#if:{{{data49|}}}|<tr><th style="{{{labelstyle|}}}">{{{label49|}}}</th><td class="{{{class49|}}}" style="{{{datastyle|}}}">{{{data49|}}}</td></tr>}}|  {{#if:{{{data49|}}}|<tr><td colspan="2" class="{{{class49|}}}" style="text-align:center; {{{datastyle|}}}">{{{data49|}}}</td></tr>}} }} }}<!--
</pre>
Row 50
 
-->{{#if:{{{header50|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header50|}}}</th></tr>| {{#if:{{{label50|}}}|{{#if:{{{data50|}}}|<tr><th style="{{{labelstyle|}}}">{{{label50|}}}</th><td class="{{{class50|}}}" style="{{{datastyle|}}}">{{{data50|}}}</td></tr>}}|  {{#if:{{{data50|}}}|<tr><td colspan="2" class="{{{class50|}}}" style="text-align:center; {{{datastyle|}}}">{{{data50|}}}</td></tr>}} }} }}<!--
header1 will be shown if any of item_one, item_two, or item_three is defined. If none of the three parameters are defined the header won't be shown.
Row 51
 
-->{{#if:{{{header51|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header51|}}}</th></tr>| {{#if:{{{label51|}}}|{{#if:{{{data51|}}}|<tr><th style="{{{labelstyle|}}}">{{{label51|}}}</th><td class="{{{class51|}}}" style="{{{datastyle|}}}">{{{data51|}}}</td></tr>}}|  {{#if:{{{data51|}}}|<tr><td colspan="2" class="{{{class51|}}}" style="text-align:center; {{{datastyle|}}}">{{{data51|}}}</td></tr>}} }} }}<!--
The trick to this is that the "if" returns false only if there is nothing whatsoever in the conditional section, so only if all three of item_one, item_two and item_three are undefined will the if statement fail.
Row 52
 
-->{{#if:{{{header52|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header52|}}}</th></tr>| {{#if:{{{label52|}}}|{{#if:{{{data52|}}}|<tr><th style="{{{labelstyle|}}}">{{{label52|}}}</th><td class="{{{class52|}}}" style="{{{datastyle|}}}">{{{data52|}}}</td></tr>}}|  {{#if:{{{data52|}}}|<tr><td colspan="2" class="{{{class52|}}}" style="text-align:center; {{{datastyle|}}}">{{{data52|}}}</td></tr>}} }} }}<!--
===Examples===
Row 53
{{Infobox
-->{{#if:{{{header53|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header53|}}}</th></tr>| {{#if:{{{label53|}}}|{{#if:{{{data53|}}}|<tr><th style="{{{labelstyle|}}}">{{{label53|}}}</th><td class="{{{class53|}}}" style="{{{datastyle|}}}">{{{data53|}}}</td></tr>}}|  {{#if:{{{data53|}}}|<tr><td colspan="2" class="{{{class53|}}}" style="text-align:center; {{{datastyle|}}}">{{{data53|}}}</td></tr>}} }} }}<!--
|name        = Infobox/doc
Row 54
|bodystyle    =
-->{{#if:{{{header54|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header54|}}}</th></tr>| {{#if:{{{label54|}}}|{{#if:{{{data54|}}}|<tr><th style="{{{labelstyle|}}}">{{{label54|}}}</th><td class="{{{class54|}}}" style="{{{datastyle|}}}">{{{data54|}}}</td></tr>}}|  {{#if:{{{data54|}}}|<tr><td colspan="2" class="{{{class54|}}}" style="text-align:center; {{{datastyle|}}}">{{{data54|}}}</td></tr>}} }} }}<!--
|title        = Test Infobox
Row 55
|titlestyle  =
-->{{#if:{{{header55|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header55|}}}</th></tr>| {{#if:{{{label55|}}}|{{#if:{{{data55|}}}|<tr><th style="{{{labelstyle|}}}">{{{label55|}}}</th><td class="{{{class55|}}}" style="{{{datastyle|}}}">{{{data55|}}}</td></tr>}}|  {{#if:{{{data55|}}}|<tr><td colspan="2" class="{{{class55|}}}" style="text-align:center; {{{datastyle|}}}">{{{data55|}}}</td></tr>}} }} }}<!--
|image        = [[Image:example.png|200px]]
Row 56
|imagestyle  =  
-->{{#if:{{{header56|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header56|}}}</th></tr>| {{#if:{{{label56|}}}|{{#if:{{{data56|}}}|<tr><th style="{{{labelstyle|}}}">{{{label56|}}}</th><td class="{{{class56|}}}" style="{{{datastyle|}}}">{{{data56|}}}</td></tr>}}|  {{#if:{{{data56|}}}|<tr><td colspan="2" class="{{{class56|}}}" style="text-align:center; {{{datastyle|}}}">{{{data56|}}}</td></tr>}} }} }}<!--
|caption      = Caption for example.png
Row 57
|captionstyle =
-->{{#if:{{{header57|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header57|}}}</th></tr>| {{#if:{{{label57|}}}|{{#if:{{{data57|}}}|<tr><th style="{{{labelstyle|}}}">{{{label57|}}}</th><td class="{{{class57|}}}" style="{{{datastyle|}}}">{{{data57|}}}</td></tr>}}|  {{#if:{{{data57|}}}|<tr><td colspan="2" class="{{{class57|}}}" style="text-align:center; {{{datastyle|}}}">{{{data57|}}}</td></tr>}} }} }}<!--
|headerstyle = background:#ccf;
Row 58
|labelstyle  = background:#ddf;
-->{{#if:{{{header58|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header58|}}}</th></tr>| {{#if:{{{label58|}}}|{{#if:{{{data58|}}}|<tr><th style="{{{labelstyle|}}}">{{{label58|}}}</th><td class="{{{class58|}}}" style="{{{datastyle|}}}">{{{data58|}}}</td></tr>}}|  {{#if:{{{data58|}}}|<tr><td colspan="2" class="{{{class58|}}}" style="text-align:center; {{{datastyle|}}}">{{{data58|}}}</td></tr>}} }} }}<!--
|datastyle    =
Row 59
 
-->{{#if:{{{header59|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header59|}}}</th></tr>| {{#if:{{{label59|}}}|{{#if:{{{data59|}}}|<tr><th style="{{{labelstyle|}}}">{{{label59|}}}</th><td class="{{{class59|}}}" style="{{{datastyle|}}}">{{{data59|}}}</td></tr>}}|  {{#if:{{{data59|}}}|<tr><td colspan="2" class="{{{class59|}}}" style="text-align:center; {{{datastyle|}}}">{{{data59|}}}</td></tr>}} }} }}<!--
|header1 = Header defined alone
Row 60
|label1  =  
-->{{#if:{{{header60|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header60|}}}</th></tr>| {{#if:{{{label60|}}}|{{#if:{{{data60|}}}|<tr><th style="{{{labelstyle|}}}">{{{label60|}}}</th><td class="{{{class60|}}}" style="{{{datastyle|}}}">{{{data60|}}}</td></tr>}}|  {{#if:{{{data60|}}}|<tr><td colspan="2" class="{{{class60|}}}" style="text-align:center; {{{datastyle|}}}">{{{data60|}}}</td></tr>}} }} }}<!--
|data1  =  
Row 61
|header2 =
-->{{#if:{{{header61|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header61|}}}</th></tr>| {{#if:{{{label61|}}}|{{#if:{{{data61|}}}|<tr><th style="{{{labelstyle|}}}">{{{label61|}}}</th><td class="{{{class61|}}}" style="{{{datastyle|}}}">{{{data61|}}}</td></tr>}}|  {{#if:{{{data61|}}}|<tr><td colspan="2" class="{{{class61|}}}" style="text-align:center; {{{datastyle|}}}">{{{data61|}}}</td></tr>}} }} }}<!--
|label2  = Label defined alone
Row 62
|data2   =
-->{{#if:{{{header62|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header62|}}}</th></tr>| {{#if:{{{label62|}}}|{{#if:{{{data62|}}}|<tr><th style="{{{labelstyle|}}}">{{{label62|}}}</th><td class="{{{class62|}}}" style="{{{datastyle|}}}">{{{data62|}}}</td></tr>}}|  {{#if:{{{data62|}}}|<tr><td colspan="2" class="{{{class62|}}}" style="text-align:center; {{{datastyle|}}}">{{{data62|}}}</td></tr>}} }} }}<!--
|header3 =
Row 63
|label3 =
-->{{#if:{{{header63|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header63|}}}</th></tr>| {{#if:{{{label63|}}}|{{#if:{{{data63|}}}|<tr><th style="{{{labelstyle|}}}">{{{label63|}}}</th><td class="{{{class63|}}}" style="{{{datastyle|}}}">{{{data63|}}}</td></tr>}}|  {{#if:{{{data63|}}}|<tr><td colspan="2" class="{{{class63|}}}" style="text-align:center; {{{datastyle|}}}">{{{data63|}}}</td></tr>}} }} }}<!--
|data3  = Data defined alone
Row 64
|header4 = All three defined (header)
-->{{#if:{{{header64|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header64|}}}</th></tr>| {{#if:{{{label64|}}}|{{#if:{{{data64|}}}|<tr><th style="{{{labelstyle|}}}">{{{label64|}}}</th><td class="{{{class64|}}}" style="{{{datastyle|}}}">{{{data64|}}}</td></tr>}}|  {{#if:{{{data64|}}}|<tr><td colspan="2" class="{{{class64|}}}" style="text-align:center; {{{datastyle|}}}">{{{data64|}}}</td></tr>}} }} }}<!--
|label4  = All three defined (label)
Row 65
|data4  = All three defined (data)
-->{{#if:{{{header65|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header65|}}}</th></tr>| {{#if:{{{label65|}}}|{{#if:{{{data65|}}}|<tr><th style="{{{labelstyle|}}}">{{{label65|}}}</th><td class="{{{class65|}}}" style="{{{datastyle|}}}">{{{data65|}}}</td></tr>}}|  {{#if:{{{data65|}}}|<tr><td colspan="2" class="{{{class65|}}}" style="text-align:center; {{{datastyle|}}}">{{{data65|}}}</td></tr>}} }} }}<!--
|header5 =
Row 66
|label5  = Label and data defined (label)
-->{{#if:{{{header66|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header66|}}}</th></tr>| {{#if:{{{label66|}}}|{{#if:{{{data66|}}}|<tr><th style="{{{labelstyle|}}}">{{{label66|}}}</th><td class="{{{class66|}}}" style="{{{datastyle|}}}">{{{data66|}}}</td></tr>}}|  {{#if:{{{data66|}}}|<tr><td colspan="2" class="{{{class66|}}}" style="text-align:center; {{{datastyle|}}}">{{{data66|}}}</td></tr>}} }} }}<!--
|data5  = Label and data defined (data)
Row 67
 
-->{{#if:{{{header67|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header67|}}}</th></tr>| {{#if:{{{label67|}}}|{{#if:{{{data67|}}}|<tr><th style="{{{labelstyle|}}}">{{{label67|}}}</th><td class="{{{class67|}}}" style="{{{datastyle|}}}">{{{data67|}}}</td></tr>}}|  {{#if:{{{data67|}}}|<tr><td colspan="2" class="{{{class67|}}}" style="text-align:center; {{{datastyle|}}}">{{{data67|}}}</td></tr>}} }} }}<!--
|belowstyle = background:#ddf;
Row 68
|below = Below text
-->{{#if:{{{header68|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header68|}}}</th></tr>| {{#if:{{{label68|}}}|{{#if:{{{data68|}}}|<tr><th style="{{{labelstyle|}}}">{{{label68|}}}</th><td class="{{{class68|}}}" style="{{{datastyle|}}}">{{{data68|}}}</td></tr>}}|  {{#if:{{{data68|}}}|<tr><td colspan="2" class="{{{class68|}}}" style="text-align:center; {{{datastyle|}}}">{{{data68|}}}</td></tr>}} }} }}<!--
}}
Row 69
 
-->{{#if:{{{header69|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header69|}}}</th></tr>| {{#if:{{{label69|}}}|{{#if:{{{data69|}}}|<tr><th style="{{{labelstyle|}}}">{{{label69|}}}</th><td class="{{{class69|}}}" style="{{{datastyle|}}}">{{{data69|}}}</td></tr>}}|  {{#if:{{{data69|}}}|<tr><td colspan="2" class="{{{class69|}}}" style="text-align:center; {{{datastyle|}}}">{{{data69|}}}</td></tr>}} }} }}<!--
<pre style="overflow:auto;">
Row 70
{{Infobox
-->{{#if:{{{header70|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header70|}}}</th></tr>| {{#if:{{{label70|}}}|{{#if:{{{data70|}}}|<tr><th style="{{{labelstyle|}}}">{{{label70|}}}</th><td class="{{{class70|}}}" style="{{{datastyle|}}}">{{{data70|}}}</td></tr>}}|  {{#if:{{{data70|}}}|<tr><td colspan="2" class="{{{class70|}}}" style="text-align:center; {{{datastyle|}}}">{{{data70|}}}</td></tr>}} }} }}<!--
|name    = Infobox/doc
Row 71
|title  = Test Infobox
-->{{#if:{{{header71|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header71|}}}</th></tr>| {{#if:{{{label71|}}}|{{#if:{{{data71|}}}|<tr><th style="{{{labelstyle|}}}">{{{label71|}}}</th><td class="{{{class71|}}}" style="{{{datastyle|}}}">{{{data71|}}}</td></tr>}}|  {{#if:{{{data71|}}}|<tr><td colspan="2" class="{{{class71|}}}" style="text-align:center; {{{datastyle|}}}">{{{data71|}}}</td></tr>}} }} }}<!--
|image  = [[Image:example.png|200px]]
Row 72
|caption = Caption for example.png
-->{{#if:{{{header72|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header72|}}}</th></tr>| {{#if:{{{label72|}}}|{{#if:{{{data72|}}}|<tr><th style="{{{labelstyle|}}}">{{{label72|}}}</th><td class="{{{class72|}}}" style="{{{datastyle|}}}">{{{data72|}}}</td></tr>}}|  {{#if:{{{data72|}}}|<tr><td colspan="2" class="{{{class72|}}}" style="text-align:center; {{{datastyle|}}}">{{{data72|}}}</td></tr>}} }} }}<!--
 
Row 73
|headerstyle  = background:#ccf;
-->{{#if:{{{header73|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header73|}}}</th></tr>| {{#if:{{{label73|}}}|{{#if:{{{data73|}}}|<tr><th style="{{{labelstyle|}}}">{{{label73|}}}</th><td class="{{{class73|}}}" style="{{{datastyle|}}}">{{{data73|}}}</td></tr>}}|  {{#if:{{{data73|}}}|<tr><td colspan="2" class="{{{class73|}}}" style="text-align:center; {{{datastyle|}}}">{{{data73|}}}</td></tr>}} }} }}<!--
|labelstyle  = background:#ddf;
Row 74
 
-->{{#if:{{{header74|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header74|}}}</th></tr>| {{#if:{{{label74|}}}|{{#if:{{{data74|}}}|<tr><th style="{{{labelstyle|}}}">{{{label74|}}}</th><td class="{{{class74|}}}" style="{{{datastyle|}}}">{{{data74|}}}</td></tr>}}|  {{#if:{{{data74|}}}|<tr><td colspan="2" class="{{{class74|}}}" style="text-align:center; {{{datastyle|}}}">{{{data74|}}}</td></tr>}} }} }}<!--
|header1 = Header defined alone
Row 75
|label1  =
-->{{#if:{{{header75|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header75|}}}</th></tr>| {{#if:{{{label75|}}}|{{#if:{{{data75|}}}|<tr><th style="{{{labelstyle|}}}">{{{label75|}}}</th><td class="{{{class75|}}}" style="{{{datastyle|}}}">{{{data75|}}}</td></tr>}}|  {{#if:{{{data75|}}}|<tr><td colspan="2" class="{{{class75|}}}" style="text-align:center; {{{datastyle|}}}">{{{data75|}}}</td></tr>}} }} }}<!--
|data1  =  
Row 76
|header2 =  
-->{{#if:{{{header76|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header76|}}}</th></tr>| {{#if:{{{label76|}}}|{{#if:{{{data76|}}}|<tr><th style="{{{labelstyle|}}}">{{{label76|}}}</th><td class="{{{class76|}}}" style="{{{datastyle|}}}">{{{data76|}}}</td></tr>}}|  {{#if:{{{data76|}}}|<tr><td colspan="2" class="{{{class76|}}}" style="text-align:center; {{{datastyle|}}}">{{{data76|}}}</td></tr>}} }} }}<!--
|label2  = Label defined alone
Row 77
|data2  =
-->{{#if:{{{header77|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header77|}}}</th></tr>| {{#if:{{{label77|}}}|{{#if:{{{data77|}}}|<tr><th style="{{{labelstyle|}}}">{{{label77|}}}</th><td class="{{{class77|}}}" style="{{{datastyle|}}}">{{{data77|}}}</td></tr>}}|  {{#if:{{{data77|}}}|<tr><td colspan="2" class="{{{class77|}}}" style="text-align:center; {{{datastyle|}}}">{{{data77|}}}</td></tr>}} }} }}<!--
|header3 =
Row 78
|label3 =
-->{{#if:{{{header78|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header78|}}}</th></tr>| {{#if:{{{label78|}}}|{{#if:{{{data78|}}}|<tr><th style="{{{labelstyle|}}}">{{{label78|}}}</th><td class="{{{class78|}}}" style="{{{datastyle|}}}">{{{data78|}}}</td></tr>}}|  {{#if:{{{data78|}}}|<tr><td colspan="2" class="{{{class78|}}}" style="text-align:center; {{{datastyle|}}}">{{{data78|}}}</td></tr>}} }} }}<!--
|data3   = Data defined alone
Row 79
|header4 = All three defined (header)
-->{{#if:{{{header79|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header79|}}}</th></tr>| {{#if:{{{label79|}}}|{{#if:{{{data79|}}}|<tr><th style="{{{labelstyle|}}}">{{{label79|}}}</th><td class="{{{class79|}}}" style="{{{datastyle|}}}">{{{data79|}}}</td></tr>}}|  {{#if:{{{data79|}}}|<tr><td colspan="2" class="{{{class79|}}}" style="text-align:center; {{{datastyle|}}}">{{{data79|}}}</td></tr>}} }} }}<!--
|label4  = All three defined (label)
Row 80
|data4  = All three defined (data)
-->{{#if:{{{header80|}}}|<tr><th colspan="2" style="text-align:center; {{{headerstyle|}}}">{{{header80|}}}</th></tr>| {{#if:{{{label80|}}}|{{#if:{{{data80|}}}|<tr><th style="{{{labelstyle|}}}">{{{label80|}}}</th><td class="{{{class80|}}}" style="{{{datastyle|}}}">{{{data80|}}}</td></tr>}}|  {{#if:{{{data80|}}}|<tr><td colspan="2" class="{{{class80|}}}" style="text-align:center; {{{datastyle|}}}">{{{data80|}}}</td></tr>}} }} }}<!--
|header5 =
Below
|label5  = Label and data defined (label)
-->{{#if:{{{below|}}}|<tr><td colspan="2" style="text-align:center; {{{belowstyle|}}}">{{{below|}}}</td></tr>}}<!--
|data5  = Label and data defined (data)
Tnavbar
 
-->{{#if:{{{name|}}}|<tr><td style="text-align:right;" colspan="2">{{Tnavbar|{{{name}}}}}</td></tr>}}
|belowstyle = background:#ddf;
</table>
|below = Below text
}}
</pre>
 
Notice how when a label is defined without an accompanying data cell the row doesn't appear in the displayed infobox, and when a header is defined on the same row as a data cell the header takes precedence.
 
{{clear}}
For this example, {{nowrap|bodystyle &#0061; width:20em;}} and {{nowrap|labelstyle &#0061; width:33%;}}
 
{{Infobox
|bodystyle    = width:20em;
|name        = Infobox/doc
|title        = Test Infobox
|titlestyle  =
|headerstyle  =
|labelstyle  = width:33%;
|datastyle    =
 
|header1 =
|label1  = Label 1
|data1  = Data 1
|header2 =  
|label2  = Label 2
|data2  = Data 2
|header3 =
|label3 = Label 3
|data3  = Data 3
|header4 = Header 4
|label4  =  
|data4  =
|header5 =
|label5  = Label 5
|data5  = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
 
|belowstyle =
|below = Below text
}}
 
{{clear}}
 
==Full blank syntax==
(Note: the template currently handles up to 80 rows; only 20 are included here since infoboxes larger than that will be relatively rare. Just extend the numbering as needed. The microformat "class" parameters are also omitted as they are not commonly used.)
 
<pre style="overflow:auto;">
{{Infobox
|name        = {{subst:PAGENAME}}
|bodystyle    =
|title        =
|titlestyle  =
|above        =
|abovestyle  =
|image        =
|imagestyle  =  
|caption      =
|captionstyle =  
|headerstyle  =  
|labelstyle  =
|datastyle    =
 
|header1 =
|label1  =
|data1    =  
|header2  =  
|label2  =  
|data2    =
|header3  =
|label3  =
|data3    =
|header4 =
|label4  =
|data4    =  
|header5  =  
|label5  =
|data5    =
|header6 =
|label6   =
|data6   =
|header7  =
|label7  =
|data7    =  
|header8  =
|label8  =  
|data8    =  
|header9  =
|label9  =
|data9    =
|header10 =
|label10  =  
|data10  =  
|header11 =  
|label11  =
|data11  =
|header12 =
|label12 =
|data12  =
|header13 =
|label13  =  
|data13  =  
|header14 =
|label14  =
|data14  =
|header15 =
|label15  =
|data15  =
|header16 =  
|label16  =
|data16  =
|header17 =  
|label17  =  
|data17  =
|header18 =
|label18 =
|data18  =
|header19 =
|label19  =
|data19  =
|header20 =
|label20  =  
|data20  =  
 
|belowstyle =
|below =
}}
</pre>
 
<includeonly>
[[Category:Infobox templates| ]]
[[Category:{{SITENAME}} metatemplates|{{PAGENAME}}]]
[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
</includeonly>

Revision as of 13:48, 9 November 2011


Usage

This template is intended as a meta-template, that is, a template that's used when constructing other templates. It's not meant for use directly in an article. See Help:Infobox for information on how to craft infoboxes in general.

Usage is similar to {{navbox}}, but with an additional distinction. Each row on the table can either be a "header", or it can have a label/data pair, or it can just be a data cell. These are mutually exclusive states so if you define a row to be both a header and a label/data pair, the label/data pair is overridden.

Note that if you want to insert an image elsewhere other than the top of the infobox, or insert other "freeform" data, using a row with just a "data" field allows for that sort of thing.

Parameters

View/discuss/edit links

name
The template page name that the "view/discuss/edit" links should point to. You can use {{subst:PAGENAME}}. If this parameter is omitted the view/discuss/edit links will not be displayed.

Title

Text in caption over infobox
(the rest of the infobox goes here)
Advertisements

<htmlet>adsense</htmlet>

Advertising: