An infobox template is an infobox that uses the template software feature.

Like static infoboxes, they are designed to present summary information about an article's subject, such that similar subjects have a uniform look and in a common format. However, the template technique allows updates of style and of common text from a central place, the template page.

These boxes are designed to be placed into main articles related to the topic area, and are often associated with on-going WikiProjects on Wikipedia. They have parameters; to work properly, the parameter values have to be specified when the template is inserted in the page. This allows each infobox to show information relevant to the article subject, while requiring only a minimal amount of coding within each article.

Design and usage[]

The recommended process for creating an infobox template is to simply begin, and gather as many requirements as possible. Test the base format for a new template as a static table first; then, once consensus is reached, migrate it into template format. The template should be reviewed before being used extensively in articles in case the template or defined parameters need modification to minimize re-works. If new fields and parameters are added, articles must be updated to reflect the new requirements. If parameters are renamed or removed, many articles will likely be unaffected, since extraneous parameters are ignored.

For consistency the following guidelines apply:

  1. Standard suggested width of 300 pixels or 25 ems (300px or 25em in CSS).
  2. Insert in the main body of articles - either after the intro or in the most appropriate section. Consider putting in the top right only in the most compelling of cases.
  3. Right-align.
  4. Using class="infobox" is a good start.
  5. The top text line should be bold and contain the full (official) name of the item. This does not need to match the article's Wikia title. It should not contain a link. Avoid {{{PAGENAME}}} as pages may be moved for disambiguation.
  6. Name the template [[Template:Infobox Some subject]] (Some subject should be in the singular with initial capital).

In creating a new infobox template, the content of Template:Infobox is a convenient starting point.

Parameters in infoboxes should be named, not numbered, to provide for future use. A parameter value can contain images (i.e. full image tags), or parameters for parts of an image tag such as the image name, size and caption. In the latter case, if an image is not applicable or available use a dummy image such as Image:No image.png.

If a parameter is not applicable, or no information is available, it must still be assigned a value. This can be the empty string, or if it is the only thing in a table cell use "some_field= ". The field will appear blank; the code is needed by some browsers for drawing the lines of the table itself properly.

There are alternative ways to make a template selectively hide information or provide default values if not defined. For an example and explanation of how these methods apply to infoboxes, see {{Infobox}}.

Interaction between multiple templates[]

Templates can be designed in a modular way, such that various combinations are possible. A combination may even appear on the page as a single infobox.

For example, if the WikiProject Saints group wanted to design a template based on their static Infobox, they could use Template:Infobox Biography, and design a project-specific template with only additional information, and the pages would render both "stacked" together.

List of templates[]

In many cases, to view a template properly, one has to look at the wikitext also. Therefore below the edit pages are linked. For viewing templates it is convenient to set the preferences to "Show preview on first edit".

The backlinks show the pages with the infobox.

Below, first the primary templates are listed; they are designed to provide high-level information appropriate to a broad subject area.

( Add ours above this line. Where they match Wikipedia's, they can be copied or adapted from below. See Wikipedia page (copied to edit box below in July 2007) for its list.)

See also[]

These pages describe other types of templates:

  • Template messages are used primarily to insert simple "boilerplate" messages for Wikia maintenance or editing purposes.
  • Navigational templates are article footers designed to provide links to several related articles.
  • MediaWiki interface messages are reserved for internal system use, and can only be modified by administrators.

This page uses Creative Commons Licensed content from Wikipedia (view authors). Smallwikipedialogo