Template:Infobox2

From Pillars of Eternity Wiki
Jump to: navigation, search
Template-info.png Documentation

This template is intended as a meta-template: a template used for constructing other templates. It is not meant for use directly in an article, but can be used on a one-off basis if required. See Infobox for an introduction to infoboxes and information on how to design them. See Category:Infobox templates for specific infobox templates.

This template is based on Wikipedia template, you can find full documentation there

Parameters[edit source]

image
File name of image (without "File:") to be displayed at the top of the template e.g. example.png. Image is centered by default. If image width exceeds infobox width, it will be scaled, to manually set the image size use the imagesize paramter e.g. |imagesize = 200x200px

Syntax example[edit source]

title
Upload image
image caption
First header
text1 {{{param1}}}
text2 {{{param2}}}
Second header
text3 {{{param3}}}
text4 {{{param4}}}
Third header
can be used for a text or a table containing two sides...
{{Infobox2
 |above   = title 
 |image   = your image
 |caption = image caption

 |header1 = First header

 |label2  = text1
 |data2   = {{{param1|}}}
 |label3  = text2
 |data3   = {{{param2|}}}

 |header4 = Second header

 |label5  = text3
 |data5   = {{{param3|}}}
 |label6  = text4
 |data6   = {{{param4|}}}

 |header8 = Third header 
 |data9   = can be used for a text or a table containing two sides...
}}
Note
  • Each row on the table can contain either a header#, or a label#/data# pair, or just a data# cell (where # is a numbers ranging from 1 to 99). These are mutually exclusive states so if you define a row with both a header and a label/data pair, the label/data pair is ignored. Use either:
header
standard row with two cell
row with one cell
|header1 = header
or
|label1  = standard row
|data1   = with two cell
or
|data1   = row with one cell -- you can put a table here with two columns for example.
  • 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:
|label2  = Optional 
|data2   = {{shows if passed|}}
|label3  = Not optional 
|data3   = {{always shows}}
|label3  = Default value
|data3   = {{param|default value}}
  • Note the row numbers don't have to be in order. Infact it is usually easier to skip some numbers between topic to make it easier to add new rows in the future.

Blank template[edit source]

Easy copy&paste common syntax for new infobox template that should work for most cases.

{{Infobox2
|above   = 
|image   =
|caption =

|label1  =
|data1   =
|label2  =
|data2   =
|label3  =
|data3   =
|label4  =
|data4   =
|label5  =
|data5   =
|label6  =
|data6   =
|label7  =
|data7   =
|label8  =
|data8   =
|label9  =
|data9   =
}}

Additional CSS styling[edit source]

Optional customization option, to personalize specific infobox (Global changes that applies to all infboxes should be made in MediaWiki:Common.css)

bodystyle Applies to the infobox table as a whole
titlestyle Applies only to the title caption. Adding a background color is usually inadvisable since the text is rendered "outside" the infobox.
abovestyle since this cell is usually used for a title, if you want to use the above cell for regular-sized text include "font-size:100%;" in the abovestyle.
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.
captionstyle Applies to the text of the image caption.
headerstyle Applies to all header cells
labelstyle Applies to all label cells
datastyle Applies to all data cells
belowstyle Applies only to the below cell


Promotional Content