FANDOM


Template documentation (for the above template, sometimes hidden or invisible)

Infobox is the main infobox used on this wiki. It has been retained after much community discussion in 2015-16.

Though now using portable infobox code, it behaves differently to most portable infoboxes in that its desktop width can vary depending on the value of a variable. The background color of the title can also be changed, as described below.

Syntax

On this wiki, the most common form of this template is its use in describing a particular power. To create an infobox of this kind, copy and paste the following code onto a page.

{{infobox
|Box title    = 
|bgcolor      =
|image        = File: Whatever.png
|imagewidth   = 
|caption      = 
|Row 1 title  = Power/Ability to:
|Row 1 info   = 
}}

Then:

  • Change Whatever.png into your desired file name.
  • Add an imagewidth between 240 and 400. This number will be understood to be in terms of pixels, without the need to actually type px.
  • Write a succinct caption for the image
  • Add an all lower case HTML color name on the bgcolor line.
  • Write a brief description of the power for Row 1 info

Notes

  • As worked out with Imouto-tan -- and because this has been the general practice at Superpower Wiki -- {{{bgcolor}}} must be entered as an all lower-case word, like lightcoral, blanchedalmond, navy, lime or slateblue. Hex or RGB codes for colors are disallowed.
  • The default colors of this template have been deliberately made into something slightly unreadable (white text on a yellow background) to remind you to choose something better for {{{bgcolor}}}. If you choose a light color for {{{bgcolor}}} -- like ivory or mistyrose -- the font color automatically switches to black so that it can be read.
  • {{{imagewidth}}} allows you to specify the width of the main infobox image, which, in turn, changes the width of the whole infobox. In other words, setting {{{imagewidth}}} to 310 means that the infobox will be 310px. However, widths below 240px are not recommended, because the images would not be particularly clear to most eyes. And widths above 400 are, according to Kuopiofi, disallowed by wiki policy. Accordingly, the box is designed to look its best in between those two numbers.
  • If you fail to fill in the {{{Box title}}}, don't worry! The PAGENAME will automatically become the title of the infobox.
  • If you don't want to display image, just keep {{{image}}} blank
  • You can add up to 9 more rows, by adding numbered pairs of Row title and Row info, like:
|Row 2 title  = Title row 2
|Row 2 info   = Info row 2
|Row 3 title  = Title row 3
|Row 3 info   = Info row 3
|Row 4 title  = Title row 4
|Row 4 info   = Info row 4
|Row 5 title  = Title row 5
|Row 5 info   = Info row 5
|Row 6 title  = Title row 6
|Row 6 info   = Info row 6
|Row 7 title  = Title row 7
|Row 7 info   = Info row 7
|Row 8 title  = Title row 8
|Row 8 info   = Info row 8
|Row 9 title  = Title row 9
|Row 9 info   = Info row 9
|Row 10 title = Title row 10
|Row 10 info  = Info row 10

Sample output

Complete Infobox:

{{Template:Infobox
|bgcolor = darkorange
|Box title = Fire Manipulation
|image = File: Ozai.gif
|imagewidth = 305
|caption = Fire Lord Ozai (Avatar: The Last Airbender) manipulating fire
|Row 1 title = Power/Ability to:
|Row 1 info = Manipulate fire
}}

Dependent pages

This template depends on a few other pages to fully function:

  • MediaWiki:Themes.css is where the color-switching happens. Though all current HTML colors already exist there, new color names are sometimes added. If you need to add a new color name, just copy and paste one of the existing color themes, and change the name of the theme to the new color.
  • MediaWiki:Wikia.css is where the CSS affecting all infoboxes lives. As of August 2016, it assumes that only this infobox template will be in major use on this wiki. If you ever need to add a wholly different kind of infobox -- one that requires a different styling -- you'll have to create a new theme for it in MediaWiki:Themes.css. Feel free to ask CzechOut for more details.

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