This is a documentation page. Meta-template used for constructing infobox templates. Infoboxes are fixed-format tables designed to be added to the top right-hand corner of articles to consistently present a summary of the article content.
Up to 40 rows in as many groups with up to 4 columns each are supported. Every row can have a varying number of columns and groups can be made collapsible. Specific conditions can be specified for each row. In addition, the template supports up to 5 images in the main image area and dynamically calculates the appropriate width/height for each image.
Usage[]
{{Infobox |games ={{{games|}}} |title ={{{name|}}} |subtitle ={{{subtitle|}}} |supertitle =example |supertitle link =examples |icon ={{{icon|}}} |main image1 ={{{image|}}} |main image1 size ={{{image size|}}} |main image desc ={{{image desc|}}} |footer ={{{footer|}}} |group1 ={{{group1|}}} |label1-1 ={{{label1|}}} |content1-2 ={{{content1|}}} }}
Most of the parameters should usually be passed down from the "end" infoboxes (i.e. the ones directly used in articles).
General explanations[]
- A given row can contain either a
group
, animage
orcontent
andlabel
cells; these 3 options are mutually exclusive. For example, if you specifygroup1
,image1
andlabel1-1
, onlygroup1
will be shown. Order of priority:group
>image
>label
>content
. - The layout for each row is generated automatically based on which cells are specified in the row itself and in the group it belongs to. It is possible to have rows with different column counts within the same group; the cells in the row with less columns will then span multiple columns, depending on exactly which columns are used in this row.
For example, if one row in a given group has 4 columns and another has only 2, the layout of the second row will vary depending on which columns are used:- If the first and the last cell are used, the first cell (of the second row) will span columns 1, 2 and 3 (of the first row).
- If the first and the second cell were used, the second cell will span columns 2, 3 and 4.
- If the first and the third cell were used, the first cell will span columns 1 and 2 while the second cell will span columns 3 and 4.
Parameters[]
Terms used in the parameter descriptions:
|example = value
Defined and not empty: A parameter is "defined and not empty" if it has been set to any value. In the example on the right, the parameterexample
is defined and not empty.|example =
Defined and empty: A parameter is "defined and empty" if it is present on the page but has been set to no value. In the example on the right, the parameterexample
is defined and empty.example
is undefined.|example = @word
Magic word: Magic words are terms which - when set as a parameter value - have a special effect. They are usually prefixed with an "@" in order to differentiate them from normal parameter values. In the example on the right, the parameterexample
is set to the magic word "@word".
Condition for corresponding row. If a cond
is defined and empty, the row is not shown. If a cond
is defined and not empty, the row is shown. If a cond
is undefined, the row is shown based on the default for its row type:
group
rows: Only displayed ifgroup
is defined, not set to "@hide" and there are rows shown (not only specified) in the group.image
rows: Only displayed ifimage
is defined and not set to "@hide".content
/label
rows: If the row containscontent
cells, it is shown if at least one of thecontent
cells is defined, not empty and not set to "@hide". If the row contains onlylabel
cells, it is shown if at least one of thelabel
cells is defined, not empty and not set to "@hide".
Column widths in percent, separated by commas (e.g. "50, 50"). Only applied to groups where the number of specified widths matches the number of columns in said group (e.g. if two widths are specified, only groups with two columns will be affected); for groups with more or less columns, the default widths are used.
Column widths in percent, separated by commas (e.g. "50, 50"). Only applied if the number of specified widths matches the number of columns in the group; otherwise colwidths
(if that has a matching number of widths) or default widths are used. Overrides general colwidths
parameter for the specific group
.
Content of corresponding cell. The first number in the parameter name indicates the row and the second number stands for the column (numbered from left to right).
Magic words:
- @hide: If all defined
content
cells in a row are set to "@hide", the row is not shown regardless of other conditions or options.
Tooltip for corresponding cell, i.e. text which is displayed if a reader moves his/her mouse over the cell.
Text of the footer, i.e. a row at the very bottom of the infobox.
Game abbreviation(s). Under normal circumstances, this doesn't need to be used. Multiple abbreviations can be specified if separated by comma (,
). These are used to create dynamic links for supertitle
. For usage details, please see supertitle link
below.
Content of corresponding cell, with the number indicating the row.
Specifying a group
row creates a new group (and a header), and all rows below it belong to that group until another group
field is specified. For example, if you set group1
, content2-1
, image3
, group4
and label5-1
, row 2 & row 3 belong to group 1 and row 5 belongs to group 4.
All rows above the first specified group
belong to group 0. For example, if you set image1
, content2-1
, image3
, group4
and label5-1
, row 2 & row 3 belong to group 0 and row 5 belongs to group 4.
Magic words:
- @hide: Creates a group without a visible header.
File name of icon (without "File:"), i.e. the small image which is displayed in the top right corner of the main image area.
Offset for icon
in pixels, i.e. the icon is moved "upwards" by the specified amount of pixels. The maximum value is "icon size
-specified height + 5".
Magic words:
- @outside: Icon is placed completely outside (above) the
main image
area.
Size of icon
in pixels. If no height/width is specified or the specified value exceeds the limit of 40px, the default icon height/width is used.
File name of image (without "File:") to be displayed in corresponding cell, with the number indicating the row. If an image
has been specified but has not been filled in, an "upload image" button will be displayed instead, prompting users to upload an image with a pre-defined file name (see image# default
).
Magic words:
- @hide: Hides the image (or "upload image" button) regardless of other conditions or options.
The file name (without "File:") which is suggested when uploading an image via the "upload image" button in the corresponding cell. It is recommended to make this depend on {{PAGENAME}}.
Description for the corresponding image
, displayed below the image.
Size for corresponding image
in pixels. If the width of the image exceeds infobox width
, the default width is used instead.
Content of corresponding cell. The first number in the parameter name indicates the row and the second number stands for the column (numbered from left to right).
Magic words:
- @hide: If there are only
label
cells defined in a given row and all of these are set to "@hide", the row is not shown regardless of other conditions or options.
Tooltip for corresponding cell, i.e. text which is displayed when a reader moves his/her mouse over the cell.
Maximum amount of main images
displayed per row. If the number of specified main images
exceeds this value, a second (and if necessary, a third/fourth/fifth) row is created. For example, if main image columns
is set to "3" and there are 2 main images
, they will be displayed in one row; if there are 4 main images
, the 4th image will be displayed in a second row.
The file name (without "File:") which is suggested when uploading an image via the "upload image" button in the main image
area. It is recommended to make this depend on {{PAGENAME}}.
Description for the main image
area, displayed below the images.
File name(s) of main image(s) (without "File:"), i.e. the images displayed directly below the infobox title
. If more than one image is used, they are displayed in a configurable amount of rows (see main image columns
) and their default sizes are adapted accordingly. If no main image
has been specified, an "upload image" button will be displayed instead, prompting users to upload an image with a pre-defined file name (see main image default
). options
can be used to disable the "upload image" button.
Magic words:
- @hide: If all defined
main image
parameters are set to "@hide", the main image area (or "upload image" button) is not shown regardless of other conditions or options.
size main images
/number of images")Size for corresponding main image
. By default, this size depends on the number of specified main images
and the amount of main image columns
. If the combined width of all main images exceeds infobox width
, images which are bigger than the default are reduced to default width.
This parameter allows to specify options which apply to the infobox itself or all groups inside. Multiple options can be specified at once; simply separate them with commas (,
).
Available choices:
- collapsedgroups: This makes all groups within the infobox collapsible and collapsed on page load. Can be overriden for individual groups by setting the group-specific
option
parameter (see below) to "uncollapsed". - collapsiblegroups: This makes all groups within the infobox collapsible and uncollapsed on page load. Can be overriden for individual groups by setting the group-specific
option
parameter (see below) to "nocollapse". - imageoptional: If set, having no
main image
specified will not result in an "upload image" button being displayed.
This parameter allows to specify options which apply to the corresponding group of rows. For example, options4
applies to all cells which belong to group4
. Multiple options can be specified at once; simply separate them with commas (,
). Group-specific options override options set for the whole infobox.
Available choices:
- collapsible, nocollapse, uncollapsed: These options control the collapse behaviour of the group. They are mutually exclusive.
- collapsed means the group is collapsible and collapsed on page load.
- collapsible/uncollapsed mean the group is collapsible and uncollapsed on page load.
- nocollapse means the group is not collapsible. This is the default setting.
width
-10) x (width
-10)px")Default size in pixels for images in image
rows. If the specified width exceeds infobox width
, the default width is used instead; if no height is specified, the default height is used instead.
width
-10) x (width
-10)px")Size of main image
area in pixels, i.e. the total space available for all main images. This is used as basis for calculating the default width of the individual main images. If the specified width exceeds infobox width
, the default width is used instead; if no height is specified, the default height is used instead.
main image# size
overrides this default for the corresponding image.
Sets the sort key, i.e. the term the page is displayed under on category pages ({{DEFAULTSORT:}}).
Text in small font below infobox title
.
Text in small font above infobox title
. Supertitles can be created dynamically by using the games
parameter. For details, see supertitle link
below.
This parameter links the supertitle
to an overview page (like Weapon). When used in conjunction with the games
parameter, it can be used to dynamically create links to game-specific overview pages (like weapons).
This is useful if an infobox template is used for multiple games and you want it to link to the correct overview pages depending on which game it is used for. For example, setting supertitle
to "weapon" and supertitle link
to "weapons", you can then let the editor in the respective article specify the games
parameter and it will link to the correct overview page (e.g. "3 weapons" if the editor enters "FO3").
{{Pagename nd}}
")Main title/"headline" of the infobox. By default, the name of the current page without any disambiguation suffixes (i.e. terms in brackets at the end) is used.
Width of the infobox in pixels. In order to achieve a standardized look across all infoboxes, infoboxes should only be resized if absolutely necessary .
Style parameters[]
All style
options should be used sparingly as they can lead to visual inconsistencies. Some examples of useful styles:
- Changing background color:
background-color: #123456;
(accepts HTML color names or RGB hex triplets) - Changing (horizontal) text-alignment:
text-align: center;
(accepts "center", "justify", "left", "right") - Changing vertical text-alignment:
vertical-align: middle;
(accepts "bottom", "middle", "top")
Specifies CSS styles to apply to the corresponding content
cell. For example, content10-3 style
applies to the cell of content10-3
etc.
Specifies CSS styles to apply to the footer
cell.
Specifies CSS styles to apply to the corresponding group
cell. For example, group6 style
applies to the cell of group6
etc.
Specifies CSS styles to apply to the icon
.
Specifies CSS styles to apply to the cell with the corresponding image
. For example, image9 style
applies to the cell of image9
etc.
Specifies CSS styles to apply to the corresponding label
cell. For example, label20-4 style
applies to the cell of label20-4
etc.
Specifies CSS styles to apply to the corresponding main image
. For example, main image3 style
applies to main image3
etc.
Specifies CSS styles to apply to every cell in the whole infobox except for the title
cell.
Specifies CSS styles to apply to all cells within the corresponding group of cells. For example, style3
applies to all cells which belong to group3
etc.
Specifies CSS styles to apply to all cells of a certain type. For example, style contents
applies to all content
cells and so forth.
Specifies CSS styles to apply to a certain type of cells within the corresponding group of cells. For example, style contents5
applies to all content
cells which belong to group5
etc.
Specifies CSS styles to apply to the title
cell.
Examples[]
Simple[]
Infobox/doc | |||||||||||||||||||||
| |||||||||||||||||||||
{{Infobox |main image1 =Wiki.png |main image1 size =100x100px |label1-1 =Label 1-1 |content1-2 =Content 1-2 |image2 =Wiki.png |label3-1 =Label 3-1 |content3-2 =Content 3-2 }}
Infobox with groups[]
Infobox/doc | ||||||||||||||||||||||||
| ||||||||||||||||||||||||
{{Infobox |main image1 =Wiki.png |main image1 size =100x100px |group1 =Group 1 |label2-1 =Label 2-1 |content2-2 =Content 2-2 |group3 =Group 3 |label4-1 =Label 4-1 |content4-2 =Content 4-2 }}
Infobox with multiple columns[]
Infobox/doc | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
{{Infobox |main image1 =Wiki.png |main image1 size =100x100px |label1-1 =Label 1-1 |content1-2 =Content 1-2 |content1-3 =Content 1-3 |content1-4 =Content 1-4 |content2-1 =Content 2-1 |content2-3 =Content 2-3 }}
Infobox with collapsible groups[]
Infobox/doc | ||||||||||||||||||||||||
| ||||||||||||||||||||||||
{{Infobox |options =collapsiblegroups |main image1 =Wiki.png |main image1 size =100x100px |group1 =Group 1 |label2-1 =Label 2-1 |content2-2 =Content 2-2 |group3 =Group 3 |label4-1 =Label 4-1 |content4-2 =Content 4-2 }}
Infobox with collapsible and non-collapsible groups[]
Infobox/doc | ||||||||||||||||||||||||
| ||||||||||||||||||||||||
{{Infobox |options =collapsiblegroups |main image1 =Wiki.png |main image1 size =100x100px |group1 =Group 1 |label2-1 =Label 2-1 |content2-2 =Content 2-2 |group3 =Group 3 |options3 =nocollapse |label4-1 =Label 4-1 |content4-2 =Content 4-2 }}
Infobox with multiple main images[]
Infobox/doc | |||||||||||||||
| |||||||||||||||
{{Infobox |options =collapsiblegroups |main image1 =Wiki.png |main image2 =Wiki.png |main image3 =Wiki.png |main image4 =Wiki.png |main image5 =Wiki.png |label1-1 =Label 1-1 |content1-2 =Content 1-2 |label2-1 =Label 2-1 |content2-2 =Content 2-2 }}
Infobox with all main images in one row[]
Infobox/doc | |||||||||||||||
| |||||||||||||||
{{Infobox |options =collapsiblegroups |main image1 =Wiki.png |main image2 =Wiki.png |main image3 =Wiki.png |main image4 =Wiki.png |main image5 =Wiki.png |main image columns =5 |label1-1 =Label 1-1 |content1-2 =Content 1-2 |label2-1 =Label 2-1 |content2-2 =Content 2-2 }}
Copy/paste[]
{{Infobox |games ={{{games|}}} |title ={{{name|}}} |subtitle ={{{subtitle|}}} |supertitle = |supertitle link = |icon ={{{icon|}}} |icon offset ={{{icon offset|}}} |main image1 ={{{image|}}} |main image1 size ={{{image size|}}} |main image2 ={{{image2|}}} |main image2 size ={{{image2 size|}}} |main image3 ={{{image3|}}} |main image3 size ={{{image3 size|}}} |main image4 ={{{image4|}}} |main image4 size ={{{image4 size|}}} |main image5 ={{{image5|}}} |main image5 size ={{{image5 size|}}} |main image desc ={{{image desc|}}} |footer ={{{footer|}}} |group1 = |label1-1 = |content1-2 ={{{|}}} |group2 = |label2-1 = |content2-2 ={{{|}}} |group3 = |label3-1 = |content3-2 ={{{|}}} |group4 = |label4-1 = |content4-2 ={{{|}}} |group5 = |label5-1 = |content5-2 ={{{|}}} |group6 = |label6-1 = |content6-2 ={{{|}}} |group7 = |label7-1 = |content7-2 ={{{|}}} |group8 = |label8-1 = |content8-2 ={{{|}}} |group9 = |label9-1 = |content9-2 ={{{|}}} |group10 = |label10-1 = |content10-2 ={{{|}}} |group11 = |label11-1 = |content11-2 ={{{|}}} |group12 = |label12-1 = |content12-2 ={{{|}}} |group13 = |label13-1 = |content13-2 ={{{|}}} |group14 = |label14-1 = |content14-2 ={{{|}}} |group15 = |label15-1 = |content15-2 ={{{|}}} |group16 = |label16-1 = |content16-2 ={{{|}}} |group17 = |label17-1 = |content17-2 ={{{|}}} |group18 = |label18-1 = |content18-2 ={{{|}}} |group19 = |label19-1 = |content19-2 ={{{|}}} |group20 = |label20-1 = |content20-2 ={{{|}}} |group21 = |label21-1 = |content21-2 ={{{|}}} |group22 = |label22-1 = |content22-2 ={{{|}}} |group23 = |label23-1 = |content23-2 ={{{|}}} |group24 = |label24-1 = |content24-2 ={{{|}}} |group25 = |label25-1 = |content25-2 ={{{|}}} |group26 = |label26-1 = |content26-2 ={{{|}}} |group27 = |label27-1 = |content27-2 ={{{|}}} |group28 = |label28-1 = |content28-2 ={{{|}}} |group29 = |label29-1 = |content29-2 ={{{|}}} |group30 = |label30-1 = |content30-2 ={{{|}}} |group31 = |label31-1 = |content31-2 ={{{|}}} |group32 = |label32-1 = |content32-2 ={{{|}}} |group33 = |label33-1 = |content33-2 ={{{|}}} |group34 = |label34-1 = |content34-2 ={{{|}}} |group35 = |label35-1 = |content35-2 ={{{|}}} |group36 = |label36-1 = |content36-2 ={{{|}}} |group37 = |label37-1 = |content37-2 ={{{|}}} |group38 = |label38-1 = |content38-2 ={{{|}}} |group39 = |label39-1 = |content39-2 ={{{|}}} |group40 = |label40-1 = |content40-2 ={{{|}}} }}
Technical[]
- This template is fairly complicated. Editing it requires a good understanding of parser functions and wiki syntax.
- Auxiliary templates:
{{Infobox/aux}}
: Generates a "content"/"label" row.{{Infobox/aux2}}
: Generates "group" tables and header rows.{{Infobox/aux3}}
: Generates an "image" row.
- Extensions used:
- Standardized documentation for templates based on this one: