Wikipedia:Infobox templates

From Freepedia

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 usually associated with on-going WikiProjects. 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.

Contents

Design and usage

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

For consistency the following rules apply:

  1. Standard suggested width of 300 pixels or 25 ems (300px or 25em in CSS).
  2. Inserted at the top of the article, and aligned to the right side. Using class="infobox" is a good start.
  3. The top line should be reasonably bold, and contain the full (official) name of the item. This does not need to match the article's Wikipedia title. It should not contain a link. Avoid {{{PAGENAME}}} as pages may be moved for disambiguation.
  4. Name the template [[Template:Infobox Somesubject]] (Somesubject should be in the singular).

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

Parameters can be named or numbered; they are usually named.

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

Similarly, a parameter value can contain links, including piped links (i.e. full link tags), or there can be parameters for parts of a link tag such as the link target and the link label. However, except with a special technique (see m:Template:Lop), in the latter case the link target and the link label have to be specified both, even in cases where they are the same.

Rules for the template calls:

  • Insert the primary template starting as the first line of the article. This can be followed by secondary templates.
  • Except in the heading, links can be used, both in the constant and in the variable texts.

If any 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.

Alternatively, there are ways to have a template change what it displays based on the parameter values it is given:

  1. If you know CSS well, you can include inline classes in your template, and use parameters to set table rows or cells to those classes.
  2. There are decision-making templates, like {{If_equal}}, which can test the values of parameters and call further templates based on the results.
    • For an example and explanation of how this is done, see {{Infobox_river}}, which omits the table row for an image and caption if the image parameter is left blank.
    • Before experimenting with this, you should understand this guideline.

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.

Industry

Name Where to use Associated
WikiProject
Template:Infobox Company (talk, links, edit) Business organization articles Companies

Anthropology and culture

Name Where to use Associated
WikiProject
Template:Ethnic group (talk, links, edit) Ethnic groups Ethnic groups

Geography

Name Where to use Associated
WikiProject
Template:Infobox river (talk, links, edit) River articles Rivers
Template:Infobox City (talk, links, edit) City articles Cities
Template:Infobox Town (talk, links, edit) Town articles None
Template:US City infobox (talk, links, edit) US City articles None
Template:Infobox Town MA (talk, links, edit) Massachusetts town articles Massachusetts
Template:Infobox Country (talk, links, edit) Country and nation articles Countries
Template:Infobox Counties (talk, links, edit) US County articles None
Template:US County infobox (talk, links, edit) US County articles None
Template:Infobox Province of Cameroon (talk, links, edit) Provinces of Cameroon None
Template:VenezuelanState (talk, links, edit) Political Divisions of Venezuela; Venezuelan State None
Template:VenezuelanState New (talk, links, edit) Political Divisions of Venezuela; Venezuelan State None
Template:Peru region table (talk, links, edit) Regions of Peru None
Template:Infobox U.S. state (talk, links, edit) U.S. state articles U.S. States
Template:Infobox England place (talk, links, edit) any UK place article None
Template:Infobox Dutch municipality 4 (talk, links, edit) Dutch municipality articles Dutch municipalities
Template:Australia state or territory (talk, links, edit) Australian States and Territories Australian politics
Template:Infobox Australian City (talk, links, edit) Australian city articles None

Astronomy

Name Where to use Associated
WikiProject
Template:Planet (talk, links, edit) Full planet articles (including Pluto) Astronomical objects
Template:Minor Planet (talk, links, edit) Minor planet articles Astronomical objects
Template:minor planet (talk, links, edit) Minor planet stub articles Astronomical objects
Template:Extrasolar Planet (talk, links, edit) Exoplanet articles Astronomical objects
Template:Starbox short (talk, links, edit) Stub star articles Astronomical objects
Template:Star (talk, links, edit) Individual star articles (this template is to be replaced by the one below) Astronomical objects
Template:Starbox base (talk, links, edit)
Template:Starbox character (talk, links, edit)
Template:Starbox astrometry (talk, links, edit)
Template:Starbox visbin (talk, links, edit)
Template:Starbox catalog (talk, links, edit)
Template:Starbox end (talk, links, edit)
Individual star articles (flexible set of templates) Astronomical objects
Template:Supernova (talk, links, edit) Supernovæ articles Astronomical objects
Template:Cluster (talk, links, edit) Globular cluster articles Astronomical objects
Template:Galaxy (talk, links, edit) Galaxy articles Astronomical objects

Chemistry

Name Where to use Associated
WikiProject
Template:Chembox (talk, links, edit) Full chemical compound articles Chemicals
Template:Chembox simple organic (talk, links, edit) Starting organic compound articles Chemicals
Template:Chembox simple inorganic (talk, links, edit) Starting inorganic compound articles Chemicals

People

Name Where to use Associated
WikiProject
Template:Infobox baseball player (talk, links, edit) Articles about professional baseball players Baseball
Template:Infobox tennis player (talk, links, edit) Articles about professional tennis players Tennis
Template:Infobox Biography (talk, links, edit) Articles describing people (living or deceased) Biography
Template:Infobox Politician (talk, links, edit) Politician articles in place of Infobox Biography none
Template:Infobox Pope (talk, links, edit) Popes in place of Infobox Biography None
Template:Infobox President (talk, links, edit) U.S. Presidents in place of Infobox Biography None
Template:Infobox Playboy Playmate (talk, links, edit) Playboy Playmates in place of Infobox Biography None
Template:Infobox Senator (talk, links, edit) Senator in place of Infobox Biography None
Template:Infobox UNSecGen (talk, links, edit) UN Secretary General in place of Infobox Biography None
Template:Ethnic group (talk, links, edit) Articles about ethnic groups etc Ethnic groups

Fiction

Name Where to use Associated
WikiProject
Template:Bondbook (talk, links, edit) James Bond books None / not known
Template:BondInfo (talk, links, edit) James Bond movies None / not known
Template:Forgotten Realms Places (talk, links, edit) Forgotten Realms places Forgotten Realms
Template:HP Character (talk, links, edit) Harry Potter characters Template:HP Character Foreign Template:HP Forest Character Template:HP Elf Character
Template:James Bond Character (talk, links, edit) James Bond characters None / not known
Template:Doctorwhocharacter (talk, links, edit) Doctor Who characters None / not known
Template:MASH Character (talk, links, edit) M*A*S*H characters Television?
Template:ST Character (talk, links, edit) Star Trek characters Star Trek?
Template:SW Character (talk, links, edit) Star Wars characters None / not known
Template:SW ship specs (talk, links, edit) Star Wars vehicle specifications None / not known
Template:Stargate character (talk, links, edit) Stargate characters None / not known
Template:Transformers characters (talk, links, edit) Transformers characters None / not known
Template:Infobox Television episode (talk, links, edit) pages on single episodes of television series Television episodes
Template:ASUE character (talk, links, edit) A Series of Unfortunate Events characters None / not known
Template:ASUE organisation (talk, links, edit) A Series of Unfortunate Events organisations None / not known

Media and Journalism

Name Where to use Associated
WikiProject
Template:MediaProjectTemplate (talk, links, edit) Project internal template Media Project templates
Template:Journalism (talk, links, edit) Journalism articles Journalism Project

Transportation

Name Where to use Associated
WikiProject
Template:Airline infobox (talk, links, edit) Airline articles Airlines
Template:Airport infobox (talk, links, edit) Airport articles Airports
Template:routeboxca2 (talk, links, edit) California State Route articles California State Highway Project
Template:routeboxwa (talk, links, edit) Washington State Route articles Washington State Highway Project
Template:routeboxKY (talk, links, edit) Kentucky State Route articles Kentucky State Highway Project
Template:routeboxint (talk, links, edit) U.S. Interstate Highway U.S. Interstate Highway Project
Template:routeboxus (talk, links, edit) U.S. Highway U.S. Highway Project
Template:Infobox road (talk, links, edit) Roads
Template:Infobox rail (talk, links, edit)
Template:Infobox SG rail (talk, links, edit)
Railroads/Railways (second for standard gauge) Trains
Template:Infobox Rail companies (talk, links, edit) Rail companies

Miscellaneous

Name Where to use Associated
WikiProject
Template:Infobox Website (talk, links, edit) Information box for articles about websites None
Template:Album infobox (talk, links, edit) Any article about a music album Albums
Template:Animal (family) (talk, links, edit) Taxonavigation box for animal families (first draft) None
Template:Infobox Canada Political Party (talk, links, edit) political parties of Canada
Template:Infobox Constellation (talk, links, edit) 88 standard constellations Constellations
Template:Infobox CVG (talk, links, edit) Computer and video game articles Computer and video games
Template:Infobox Game (talk, links, edit) Game descriptions Games
Template:Infobox Arcade Game (talk, links, edit) Arcade game descriptions
Template:Infobox machinima (talk, links, edit) Machinima productions None
Template:Infobox Movie (talk, links, edit) Movies and films Films
Template:Infobox Music genre (talk, links, edit) Musical genre articles Music genres
Template:Infobox Software (talk, links, edit) Computer software Software
Template:Infobox Top level domain (talk, links, edit) Top level domain None
Template:Infobox SuperBowl (talk, links, edit) Super Bowl games National Football League
Template:Infobox television (talk, links, edit) Television series Television
Template:Infobox University (talk, links, edit) Universities and colleges Universities
Template:Infobox University2 (talk, links, edit) Universities and colleges Universities
Template:Infobox Australian University (talk, links, edit) Universities in Australia AWNB
Template:Infobox Radio station (talk, links, edit) Radio stations Radio Stations
Template:Infobox Space Shuttle mission (talk, links, edit) Space Shuttle mission articles

Secondary templates

These are designed to supplement information provided by primary templates.

Name Current text Where to use
(primary template)
Associated
WikiProject
Template:Infobox BPM (talk, links, edit)
Prime Minister of the
United Kingdom:
10 May 1940
27 July 1945
Predecessor: Neville Chamberlain
Successor: Clement Attlee
Political Party: Conservative Party
Articles describing British Prime Ministers
(primary template is {{Infobox Biography}})
Biography

See also

These pages describe other types of templates:



Views
Personal tools
In other languages
Similar Links