Template:Infobox transwiki/doc

Description
This template is used to create an infobox. This template generally should not be used directly on pages, and should instead be used on other template pages, which are then transcluded into pages (thus creating two transclusion layers instead of just one).

Usage
Usage is similar to Navbox, but much simpler. Each row on the table can contain either a header, a label/data pair, or just a data cell.

This all seems very complicated at first, but it will be easier as we go along (with examples too!).

Title parameters
This parameter places its contents in the uppermost cell of the table. This serves as the "title" of the infobox, and is best used to list the name of the subject it is describing.
 * above

Adds an additional title field that is shown just below above, but above any images in the infobox.
 * subheader

Examples


Image parameters
These parameters display the first image shown in the infobox. In general, one image works best; if you want a montage, it's best to create one using an image editing program and uploading it to the wiki as one image.

Additional images can be shown later in the text by using the dataN parameters without the headerN and labelN parameters (we'll show you what we mean later).

Specify the file name of the image you want to use. Use full image syntax (e.g. . You can resize the image if needed (e.g.  ).
 * image

Adds a caption underneath the image. Will not work if image is empty.
 * caption

Examples


Main data parameters
Replace N with a number. The numbers will determine the ordering of the values, and should add up as you add more parameters. Infobox supports up to 80 of these parameters; any additional parameters after that will be ignored (but really, who needs 80 cells in an infobox?). Used to add a header that will be bolded and centered. Good for dividing information up within an infobox.
 * headerN

Used to add a label that will be shown on the left and in bold. If a corresponding headerN is used, it will appear under that. A corresponding dataN is required for this parameter to work; otherwise it will simply be ignored.
 * labelN

Used to add the actual data of the infobox. If a corresponding labelN is used, it will appear to the right of that. If a corresponding headerN is used, it will appear under that. dataN can be used without a corresponding labelN, in which case it will be centered.
 * dataN

Examples
Using the first two label and data parameters, without headers.



Notice how the ordering changes when N is changed. The ordering of the parameters in the wikitext of the page does not matter.



It is okay to skip numbers; doing so has no effect on the output of the template. This can be useful if you want to "reserve" positions on the template for future parameters.



First three label and data parameters, with headers.



First data parameter, without label.



Below parameter
Text to put in the bottom cell, below all the other cells. This cell is good for things like footnotes, "See also" sections, and other information.
 * below

Examples


Adding images to the body of the infobox
The infobox contains only one image parameter, which displays images near the top of the infobox. However, it is still possible to insert an image later in the text using dataN parameters.

To do this, simply add the desired image in full image syntax to a dataN parameter, leaving the corresponding labelN parameter blank.



For a caption, simply use the next dataN parameter and leave your caption there, again without its corresponding labelN.



CSS styling parameters
These templates can be used to apply Cascading Style Sheets styling to the infobox. All parameters here are optional.

Applies to the infobox as a whole.
 * bodystyle

Applies to the above cell only. The default size is 125%, since this parameter is usually used for a title. If you want to use this cell for regular-sized text, add  to this parameter.
 * abovestyle

Applies to the subheader cell only.
 * subheaderstyle

Applies to the cell the image is in. Also applies to the caption as well.
 * imagestyle

Applies to the text of the image caption.
 * captionstyle

Applies to all headers in the infobox.
 * headerstyle

Applies to all label cells.
 * labelstyle

Applies to all data cells.
 * datastyle

Applies only to the below cell.
 * belowstyle

HTML class parameters
This parameter is inserted into the  attribute for the infobox as a whole.
 * bodyclass

This parameter is inserted into the  attribute for the above cell.
 * aboveclass

This parameter is inserted into the  attribute for the subheader cell.
 * subheaderclass

This parameter is inserted into the  attribute for the image.
 * imageclass

This parameter is inserted into the  attribute for the data cell of the specified row. It is ignored if the corresponding dataN cell does not exist.
 * classN

This parameter is inserted into the  attribute for the below cell.
 * belowclass

Unused parameters
The use of title is not recommended as the title is not centered on the infobox, resulting in general unsightliness. You can still use it if you want to, for whatever reason. Use above instead.
 * title

CSS
This template requires the use of some CSS styling parameters in order to display correctly, which can be found at MediaWiki:Common.css.

If you are exporting this template to another wiki, be sure to paste the following code into the appropriate .css page on your wiki.

Credits
This template's code was taken from Wikipedia:WikiProject Transwiki/Template:Infobox. It is a modified version of the Infobox template for the English Wikipedia that was meant to be portable to other MediaWiki installations.

Parts of this template's documentation was taken from Template:Infobox/doc on the English Wikipedia. The images used in this documentation are from the Wikimedia Commons.