FANDOM


Template documentation (for the above template, sometimes hidden or invisible)
Description
This template is used as a base template (also known as a "meta-template") for creating other infobox templates in a common style.
Dependencies
.infobox-table {float:right; width:250px; margin:.5em 0 1em 1em; border-collapse:collapse; font-size:80%; line-height:1.5}
.infobox-table ul {list-style:none; margin:0px}
.infobox-image {padding:0; color:#FFFFFF}
.infobox-title {font-size:larger; color:#FFFFFF}
.infobox-header {text-align:left}
.infobox-row {height:3em; background:#FFFFFF; border-top:1px solid #999999; vertical-align:middle}
.infobox-cell, .infobox-more {padding:0px}
.infobox-label {width:6em; padding-left:1em; text-align:left}
.infobox-conflict {width:50%; background:#FFFFFF; border-top:1px solid #999999; padding-left:1em; padding-right:1em; vertical-align:top; text-align:left}
.infobox-gallery {text-align:center; font-weight:bold}


Syntax
Usage of this template can be broken down into three steps.
Step 1
The first step is to paste in the top few parameters of this template:
{{Infobox
| nation	= {{{nation|}}}
| image		= {{#if:{{{image|}}}|[[File:{{{image}}}|{{#if:{{{image size|}}}|<!--then:-->{{{image size}}}px|<!--else:-->250px}}|{{{image hover|{{BASEPAGENAME}}}}}]]}}
| name		= {{{name|}}}


For most cases, leave the parameter contents ({{{nation|}}} etc.) as is. An explanation of these parameters:
  • The nation parameter enables this template to switch between color themes to match what is needed on a page. Using the default setting from above, users would be required to set the color theme on the article itself. If the template you are creating does not require different colors to suit different articles, then you can set all transclusions of a template to use one theme only by replacing {{{nation|}}} with one of the following:
    • blue corresponds to a blue theme
    • green corresponds to a green theme
    • red corresponds to a red theme
    • orange corresponds to an orange theme
    • grey corresponds to a grey theme
    • purple corresponds to a purple theme.
  • The image parameter allows the infobox to display one image at the top. Using the default setting from above, an infobox template created from this meta-template would insert images in the following format: Image name.extension, for example Aang.png.
  • The name parameter allows an infobox created from this meta-template to display the name of the article. This setting should never need to be changed.
Step 2
The next several rows of parameters for this template should be the data cells for your infobox. For example, the following possibilities are possible for the first row of an infobox template:
| header1	=
| label1	=
| data1		=
| conflicta1	=
| conflictb1	=
| bborder1	=


  • header1 allows this row to become a heading inside the template, in order to indicate the beginning of a section of data.
  • label1 and data1 together allow this row to become a standard infobox row. label1 becomes the label for this row, while data1 becomes the data one fills in on the article itself.
  • conflicta1 and conflictb1 together allow this row to become a comparison between two sides, such as for force strengths in a battle.
The above code example was just for the first row. Up to 30 rows are possible in this template.
  • bborder1 should be used on the bottom row of an infobox to set a colored bottom border for the infobox rather than the default grey. It is recommended that you simply paste the following, which allows the bottom border to always be consistent with the nation parameter: {{#ifexist:Category:{{BASEPAGENAME}} images|#999999|{{Infobox/color|color={{{nation|}}}}}}}
| header1	=
| label1	=
| data1		=
| conflicta1	=
| conflictb1	=
| bborder1	=
| header2	=
| label2	=
| data2		=
| conflicta2	=
| conflictb2	=
| bborder2	=
| header3	=
| label3	=
| data3		=
| conflicta3	=
| conflictb3	=
| bborder3	=


Step 3
Finish your infobox template by inserting the following:
| more		=
}}


The more parameter allows more "non-infobox" content to become part of the infobox. It is by itself a table cell spanning two columns. If you wish to use table code inside this parameter, you must use HTML tables, not wiki table code.
Sample input
The example from above put together:
{{Infobox
| nation	= {{{nation|}}}
| image		= {{#if:{{{image|}}}|[[File:{{{image}}}|{{#if:{{{image size|}}}|<!--then:-->{{{image size}}}px|<!--else:-->250px}}|{{{image hover|{{BASEPAGENAME}}}}}]]}}
| name		= {{{name|}}}
| header1	=
| label1	=
| data1		=
| conflicta1	=
| conflictb1	=
| bborder1	= 
| header2	=
| label2	=
| data2		=
| conflicta2	=
| conflictb2	=
| bborder2	=
| header3	=
| label3	=
| data3		=
| conflicta3	=
| conflictb3	=
| bborder3	=
| more		=
}}


A filled-out example:
{{Infobox
| nation	= {{{nation|}}}
| image		= {{#if:{{{image|}}}|[[File:{{{image}}}|{{#if:{{{image size|}}}|<!--then:-->{{{image size}}}px|<!--else:-->250px}}|{{{image hover|{{BASEPAGENAME}}}}}]]}}
| name		= {{{name|}}}
| header1	= {{#if:{{{age|}}}{{{gender|}}}|General information}}
| label2	= Age
| data2		= {{{age|}}}
| label3	= Gender
| data3		= {{{gender|}}}
| bborder3	= {{#ifexist:Category:{{BASEPAGENAME}} images|#999999|{{Infobox/color|color={{{nation|}}}}}}}
}}

Visit Template:Infobox/doc to edit this text! (How does this work?)
Community content is available under CC-BY-SA unless otherwise noted.