Wikipedia:WikiProject Infoboxes/Simple templates

From Wikipedia, the free encyclopedia

Infobox templates
Simple and pretty
This is an infobox, created in seconds.
Feature Pretty
Feature Very easy to use
Feature Highly flexible
Disadvantage
Tacky promotional gimmicks like this.

This page introduces a family of templates. These are intended to address two issues with future (and, perhaps, current) infoboxes:

  1. Infobox templates, often employing esoteric features of the Wiki software, are difficult to design and to maintain.
  2. The visual appearance of infoboxes tends to be inconsistent. Subtle inconsistencies tend to reduce the professional appearance of the encyclopaedia as a whole.

The following family of templates are designed to be an easy-to-use, consistent, and flexible method for producing new infobox templates. They can also be used to replace existing templates, where there is consensus to do so (the intent is not to force consistency on anyone, but to make it more convenient and attractive).

Contents

[edit] Templates

Title
Subtitle
Head
Middle
Second title
Second section
Bottom title
Bottom
{{Make Infobox}}

This is the primary template for making infoboxes. There are eight possible parts to an infobox: the title, the subtitle, the head, the middle, the second title, the second section, the bottom title, and the bottom. The subtitle, head, second title, second section, bottom title, and bottom are optional.

 
Title
Label 1 Value 1
Label 2 Value 2
{{Make Infobox Entry}}

This template is used for making entries in the middle section of an infobox. Each entry has a label and a value. Labels are (normally) bold, right-justified, and on a light grey background. To their right is found the value (with optional units and/or conversions via {{convert}}). If a value is not supplied the entry will not be visible.

{{Make Infobox CondEntry}}

Similar to Make Infobox Entry, this template takes an additional parameter that is tested separately.

 
Title
(Image caption)
(Image caption)
Middle
Bottom
{{Make Infobox Head ImgCaption}}

This template is used to create an image (with optional caption), for use in the head or bottom section.

 

[edit] Example Infobox Template

The following is an example infobox template. Compare the simplicity of the implementation with {{Infobox River}}. Usage of both templates is exactly the same.

An (almost) identical template is used to generate the infobox in the following section (see Wikipedia:WikiProject Infoboxes/Simple templates/Example River).

{{Make Infobox
  |ibtitletext={{{river_name}}}
  |ibtitlebg=#cedeff

  |ibheadtext={{Make Infobox Head ImgCaption |imgname={{{image_name|}}} 
                |imgsize={{{image_size|}}} |caption={{{caption|}}}}}

  |ibmiddleentries=
    {{Make Infobox Entry
      |label=[[Source (river or stream)|Origin]] |value={{{origin|}}}}}
    {{Make Infobox Entry
      |label=Mouth |value={{{mouth|}}}}}
    {{Make Infobox Entry
      |label=[[Drainage basin|Basin]] countries |value={{{basin_countries|}}}}}
    {{Make Infobox Entry
      |label=Length |value={{{length|}}}}}
    {{Make Infobox Entry
      |label=[[Source (river or stream)|Source]] elevation |value={{{elevation|}}}}}
    {{Make Infobox Entry
      |label=Mouth elevation |value={{{mouth_elevation|}}}}}
    {{Make Infobox Entry
      |label=Avg. [[Discharge (hydrology)|discharge]] |value={{{discharge|}}}}}
    {{Make Infobox Entry
      |label=Basin area |value={{{watershed|}}}}}
}}

[edit] Example infoboxes

The following infoboxes are intended to demonstrate the capabilities of the templates described above. Each is based upon existing infobox templates used on Wikipedia articles.

[edit] Example river

Arno
The Arno river
The Arno river
Origin Mount Falterona
Mouth Tyrrhenian Sea
Basin countries Italy
Length 241 km
Source elevation 1,385 m
Avg. discharge 110 m³/s (at the mouth)
Basin area 8,228 km²

This example demonstrates an infobox with a head (containing the image and caption) and a middle (containing the statistical information).

The infobox should be very similar to that which appears on Arno River. Except for the name of the transcluded template, the syntax is exactly the same as in that article.

 


[edit] Example disease

This is an example disease infobox. It should be similar to that which appears on measles.

Measles
Classification & external resources
How Measles affects the skin.
How Measles affects the skin.
 

[edit] Example military test site

Amchitka Underground Test Site
Cannikin warhead being lowered into test shaft
Type Nuclear testing range
Operator United States Department of Energy
Status Inactive
In use 1965–1971
Remediation
status
2001–2025 (DoE estimate)
Testing
Thermonuclear tests 3
Location of the site

Here is an example military test site infobox, resembling that of Amchitka.