Misplaced Pages

Help:Infobox: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 10:20, 10 December 2012 editThumperward (talk | contribs)Administrators122,802 edits use a more up-to-date infobox example← Previous edit Latest revision as of 05:12, 25 September 2024 edit undoDB1729 (talk | contribs)Extended confirmed users, Pending changes reviewers, Rollbackers137,696 edits Reverted 1 edit by 49.205.128.26 (talk): Misplaced contentTags: Twinkle Undo 
(208 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
{{Offer help}} {{short description|Misplaced Pages help article}}
{{about||a list of infoboxes|:Category:Infobox templates|the style guide|Misplaced Pages:Manual of Style (infoboxes)|the project|Misplaced Pages:WikiProject Infoboxes}} {{about||a list of infoboxes|Misplaced Pages:List of infoboxes|and|Category:Infobox templates|the style guide|Misplaced Pages:Manual of Style/Infoboxes|the project|Misplaced Pages:WikiProject Infoboxes|text=For the template, see ]}}
{{Misplaced Pages how to|H:IB}}
] ]
{{Infoboxwatch}}
{{WikiProject Infoboxes sidebar}}


An '''infobox''' is a fixed-format table designed to be added to the top right-hand corner of articles to consistently present a summary of some unifying aspect that the articles share and sometimes to improve navigation to other interrelated articles. Many infoboxes also emit ] and are used by ] for that purpose. The generalized infobox feature grew out of the original ] (taxonomy infoboxes) that editors developed to visually express the scientific classification of organisms. An ] is a fixed-format table usually added to the top right-hand corner of articles to consistently present a summary of some unifying aspect that the articles share and sometimes to improve navigation to other interrelated articles. Many infoboxes also emit structured ] which is sourced by ] and other third party re-users. The generalized infobox feature grew out of the original ] (taxonomy infoboxes) that editors developed to visually express the scientific classification of organisms.


The use of infoboxes is neither required nor prohibited for any article. Whether to include an infobox, which infobox to include, and which parts of the infobox to use, is determined through ] at each individual article. The use of infoboxes is neither required nor prohibited for any article. Whether to include an infobox, which infobox to include, and which parts of the infobox to use, is determined through ] at each individual article.


==What infoboxes do== ==What infoboxes do==
Infobox templates contain important facts and statistics of a type which are common to related articles. For instance, all animals have a scientific classification (species, family and so on), as well as a conservation status. Adding a {{tl|taxobox}} to articles on animals therefore makes it easier to quickly find such information and to compare it with that of other articles. Infobox templates contain important facts and statistics of a type which are common to related articles. For instance, all animals have a scientific classification (species, family and so on), as well as a conservation status. Adding a {{tlx|taxobox}} to articles on animals therefore makes it easier to quickly find such information and to compare it with that of other articles.


Infobox templates are like fact sheets, or sidebars, in magazine articles. They quickly summarize important points in an easy-to-read format. However, they are ''not'' "statistics" tables in that they (generally) only summarize material from an article<!--taxoboxes are an obvious exception, and so are element infoboxes -->—the information should still be present in the main text, partly because it may not be possible for some readers to access the contents of the infobox. In particular, if infobox templates hide long columns of data inside collapsing tables, then readers using ] may miss their presence entirely. Infobox templates are like fact sheets, or sidebars, in magazine articles. They quickly summarize important points in an easy-to-read format. However, they are {{em|not}} "statistics" tables in that they (generally) only summarize material from an article<!--taxoboxes are an obvious exception, and so are element infoboxes -->—the information should still be present in the main text, partly because it may not be possible for some readers to access the contents of the infobox. In particular, if infobox templates hide long columns of data inside collapsing tables, then readers using ] may miss their presence entirely.


Many infoboxes also emit metadata such as ]s (see ]). Many infoboxes also emit metadata such as ]s {{crossref|printworthy=y|(see ])}}.


==What should an infobox contain?== ==What should an infobox contain?==
Line 19: Line 20:


* '''Comparable.''' If a lot of different subjects all share a common attribute (for instance, all people have a name and a date of birth), then it is useful to be able to compare these across different pages. This also implies that where possible, material should be presented in a standard format. * '''Comparable.''' If a lot of different subjects all share a common attribute (for instance, all people have a name and a date of birth), then it is useful to be able to compare these across different pages. This also implies that where possible, material should be presented in a standard format.
* '''Concise.''' Infobox templates are "at-a-glance", and used for quickly checking facts. Long bodies of text, or very detailed statistics, belong in the article body. * '''Concise.''' Infobox templates are "at-a-glance", and used for quickly checking facts.
* '''Materially relevant to the subject.'''
* '''Materially relevant to the subject.''' A common problem is including material which is trivial and would not otherwise be included in the article body: for example, a fictional character's ] may be referenced in passing in a work, but it is not especially useful to understanding the subject. Infobox templates should not be used for details that are too trivial to include in the article body.
* '''Already cited elsewhere in the article.''' Infoboxes, like the ] should contain primarily material that is expanded on and supported by citations to reliable sources elsewhere in the article. However, if necessary (e.g., because the article is currently incomplete), it is possible to include ] in infoboxes. * '''Already cited elsewhere in the article.''' Infoboxes, like the ], should primarily contain material that is expanded on and supported by citations to reliable sources elsewhere in the article. However, if necessary (e.g., because the article is currently incomplete), it is possible to include ] in infoboxes.

==What should an infobox not contain?==
In general, data in infobox templates should not have:

* '''Excessive length.''' Long bodies of text, or very detailed statistics, belong in the article body.
* '''Trivial details.''' A common problem is including material in the infobox which is trivial and would not otherwise be included in the article body: for example, a fictional character's ] may be referenced in passing in a work, but it is not especially useful to understanding the subject. Infobox templates should not be used for details that are too trivial to include in the article body (there are some exceptions, such as chemical properties).
* '''Flags.''' Flag icons should generally ] in infoboxes, even when there is a "country", "nationality" or equivalent field: they are unnecessarily distracting and give undue prominence to one field among many.


==Adding an infobox to an article== ==Adding an infobox to an article==


There are two steps required to add an infobox to an article: There are two steps required to add an infobox to an article:
#Locating the infobox #Finding the infobox
#Editing the article #Editing the article


===Locating the infobox=== ===Finding the infobox===
In order to use an infobox in an article, an editor must know its name, parameters, and how those parameters are intended to be used. Because infoboxes are kept in a ] separate from articles, it takes some effort to identify an infobox by name. Once the editor has the name, however, it's straightforward to lookup the infobox's documentation. In order to use an infobox in an article, an editor must know its name, parameters, and how those parameters are intended to be used. Because infoboxes are kept in a ] separate from articles, it takes some effort to identify an infobox by name. Once the editor has the name, however, it is straightforward to look up the infobox's documentation.


There are two ways in which an editor typically locates which infobox he or she wants to use: There are two ways in which an editor typically locates which infobox they want to use:
*By browsing the set of all infoboxes via ]. *By browsing the set of all infoboxes via ].
*By determining the name of a particular infobox used in a particular article. *By determining the name of a particular infobox used in a similar article.


For example, the article ] contains an infobox. To determine which one, simply edit the article: For example, the article ] contains an infobox. To determine which one, simply edit the article:


<syntaxhighlight lang="wikitext">
<pre>
{{Infobox connector {{Infobox connector
... ...
}} }}
</syntaxhighlight>
</pre>


The "<CODE>{{Infobox connector</CODE>" identifies the markup between the enclosing braces as a use of the "<code>connector</code>" infobox. The editor can look up the documentation for the template, including a list of parameters, in the Template namespace under ]. The "<CODE>{{Infobox connector</CODE>" identifies the markup between the enclosing braces as a use of the "<code>connector</code>" infobox. The editor can look up the documentation for the template, including a list of parameters, in the Template namespace under ].


===Editing the target article=== ===Editing the target article===
Line 53: Line 61:
For example: For example:


<syntaxhighlight lang="wikitext">
<pre>
{{Infobox person {{Infobox person
|name = | name =
|image = | image =
|caption = | caption =
... ...
|website = | website =
}} }}
</syntaxhighlight>
</pre>


might be filled out like this: might be filled out like this:


<syntaxhighlight lang="wikitext">
<pre>
{{Infobox person {{Infobox person
|name = Casanova | name = Casanova
|image = Casanova_self_portrait.jpg | image = Casanova self portrait.jpg
|caption = A self portrait of Casanova | caption = A self-portrait of Casanova
... ...
|website = | website =
}} }}
</syntaxhighlight>
</pre>


In this example, the names of the parameters ("<CODE>name</CODE>", "<CODE>image</CODE>", "<CODE>caption</CODE>", "<CODE>website</CODE>") are fixed in the design of the infobox and described in its documentation. A parameter that is misspelled or is not supported by the infobox implementation does not display at all. In this example, the names of the parameters ("<CODE>name</CODE>", "<CODE>image</CODE>", "<CODE>caption</CODE>", "<CODE>website</CODE>") are fixed in the design of the infobox and described in its documentation. A parameter that is misspelled, falsely capitalized, or is not supported by the infobox implementation does not display at all. To find out exactly which parameters are functional, look at the infobox's template page. Anything not listed there will be ignored, even if it works in some other infobox. If you believe that another parameter needs to be added to a given infobox template, then suggest that on the infobox's talk page.


The infobox documentation describes which parameters are required and which are optional. Required parameters display between triple braces (for example, <CODE>{{{requiredparametername}}}</CODE>) when previewed or saved. Optional parameters may be left empty or omitted entirely. The infobox documentation describes which parameters are required and which are optional. Required parameters display between triple braces (for example, <CODE>{{{requiredparametername}}}</CODE>) when previewed or published. Optional parameters may be left empty or omitted entirely.

===Troubleshooting===
If you added an infobox and it didn't display correctly, here are the common errors:

* You used a made-up or invalid parameter. You can only use parameters that have been pre-programmed into ''this'' infobox template.
* You misspelled the parameter name or omitted necessary punctuation (e.g., leaving out the ] in <code>birth_place</code>).
* You capitalized the parameter name. Parameters are ]. Nearly all infoboxes use lowercase parameter labels.
* You included the prefix <code>File:</code> before the image name (or you didn't, and it's one of the templates that requires it).
* You used the parameter name more than once: only the final instance displays.


==Adding an image to an infobox== ==Adding an image to an infobox==
Line 84: Line 101:


The <CODE>image</CODE> parameter sometimes requires the ]; other times it requires only the image file name depending on the tastes of the editor who created the infobox. An editor can determine this either by experimenting (using the "preview" function) or by consulting the infobox template documentation. The <CODE>image</CODE> parameter sometimes requires the ]; other times it requires only the image file name depending on the tastes of the editor who created the infobox. An editor can determine this either by experimenting (using the "preview" function) or by consulting the infobox template documentation.

Many images in infoboxes should have a ] for people who cannot see the image.

==Combining multiple infoboxes==
{{For|detailed guidance on how combine multiple infoboxes|Misplaced Pages:WikiProject Infoboxes/embed}}
If an article requires two or more infoboxes it is often possible to combine them into one,
by including the others as a module (or child-, or sub-template) of the first. Alternately, it can be useful to use {{tl|stack}} as a container for them to prevent layout problems with other images and floating elements in the article.


==Designing an infobox== ==Designing an infobox==
{{Main|Help:Designing infoboxes}} {{for|detailed guidance on how to design infoboxes|Help:Designing infoboxes}}
It is a good idea to seek the opinions of other editors before embarking on a design of a new infobox or redesign of an existing one. Most requirements are already met by an existing infobox and most of the remainder can be met with a tweak. Unnecessary duplication leads to clutter and article divergence. Prototype your new design in your own ]. Once prototyped, propose the infobox changes to the appropriate ] and gain ] before deploying your new design in the ]. It is a good idea to seek the opinions of other editors before embarking on a design of a new infobox or redesign of an existing one. Most requirements are already met by an existing infobox and most of the remainder can be met with a tweak. Unnecessary duplication leads to clutter and article divergence. Prototype your new design in your own ]. Once prototyped, propose the infobox changes to the appropriate ] and gain ] before deploying your new design in the ].

For detailed guidance on how to design infoboxes, see ].


==Deleting an infobox== ==Deleting an infobox==
Requests to delete an infobox should be brought to the attention of ] and any ]s associated with the infobox. A template may be merged with another rather than deleted outright. Requests to delete an infobox should be brought to the attention of ] and any ]s associated with the infobox. The WikiProject associated with the subject can usually be found at the top of the talk page of the article. A template may be merged with another rather than deleted outright.
{{Help:Infobox/user style}}


==See also== ==See also==
{{Misplaced Pages glossary}} {{Misplaced Pages glossary}}
*]
*]
*] *]
*] *]
*] to ask questions about using infoboxes in articles if you weren't able to find the information you need on this help page.
*]
*] – an essay expressing a particular viewpoint
*] to ask questions about using infoboxes in articles if you weren't able to find the information you need on this help page.
*{{sectionlink|Infobox|Misplaced Pages}}

----

{{Help pages footer}} {{Offer help}}
{{Help navigation}}


]
]


]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]

Latest revision as of 05:12, 25 September 2024

Misplaced Pages help article For a list of infoboxes, see Misplaced Pages:List of infoboxes and Category:Infobox templates. For the style guide, see Misplaced Pages:Manual of Style/Infoboxes. For the project, see Misplaced Pages:WikiProject Infoboxes. For the template, see Template:Infobox.
This help page is a how-to guide.
It explains concepts or processes used by the Misplaced Pages community. It is not one of Misplaced Pages's policies or guidelines, and may reflect varying levels of consensus.
Shortcut
Example of an infobox
WikiProject Infoboxes
List of infoboxes
Style and help
Cleanup
Talk page
Article
Building
To do

An infobox is a fixed-format table usually added to the top right-hand corner of articles to consistently present a summary of some unifying aspect that the articles share and sometimes to improve navigation to other interrelated articles. Many infoboxes also emit structured metadata which is sourced by DBpedia and other third party re-users. The generalized infobox feature grew out of the original taxoboxes (taxonomy infoboxes) that editors developed to visually express the scientific classification of organisms.

The use of infoboxes is neither required nor prohibited for any article. Whether to include an infobox, which infobox to include, and which parts of the infobox to use, is determined through discussion and consensus among the editors at each individual article.

What infoboxes do

Infobox templates contain important facts and statistics of a type which are common to related articles. For instance, all animals have a scientific classification (species, family and so on), as well as a conservation status. Adding a {{taxobox}} to articles on animals therefore makes it easier to quickly find such information and to compare it with that of other articles.

Infobox templates are like fact sheets, or sidebars, in magazine articles. They quickly summarize important points in an easy-to-read format. However, they are not "statistics" tables in that they (generally) only summarize material from an article—the information should still be present in the main text, partly because it may not be possible for some readers to access the contents of the infobox. In particular, if infobox templates hide long columns of data inside collapsing tables, then readers using assistive technology may miss their presence entirely.

Many infoboxes also emit metadata such as microformats (see WP:WikiProject Microformats).

What should an infobox contain?

In general, data in infobox templates should be:

  • Comparable. If a lot of different subjects all share a common attribute (for instance, all people have a name and a date of birth), then it is useful to be able to compare these across different pages. This also implies that where possible, material should be presented in a standard format.
  • Concise. Infobox templates are "at-a-glance", and used for quickly checking facts.
  • Materially relevant to the subject.
  • Already cited elsewhere in the article. Infoboxes, like the introduction to the article, should primarily contain material that is expanded on and supported by citations to reliable sources elsewhere in the article. However, if necessary (e.g., because the article is currently incomplete), it is possible to include footnotes in infoboxes.

What should an infobox not contain?

In general, data in infobox templates should not have:

  • Excessive length. Long bodies of text, or very detailed statistics, belong in the article body.
  • Trivial details. A common problem is including material in the infobox which is trivial and would not otherwise be included in the article body: for example, a fictional character's blood type may be referenced in passing in a work, but it is not especially useful to understanding the subject. Infobox templates should not be used for details that are too trivial to include in the article body (there are some exceptions, such as chemical properties).
  • Flags. Flag icons should generally not be used in infoboxes, even when there is a "country", "nationality" or equivalent field: they are unnecessarily distracting and give undue prominence to one field among many.

Adding an infobox to an article

There are two steps required to add an infobox to an article:

  1. Finding the infobox
  2. Editing the article

Finding the infobox

In order to use an infobox in an article, an editor must know its name, parameters, and how those parameters are intended to be used. Because infoboxes are kept in a namespace separate from articles, it takes some effort to identify an infobox by name. Once the editor has the name, however, it is straightforward to look up the infobox's documentation.

There are two ways in which an editor typically locates which infobox they want to use:

For example, the article D-Terminal contains an infobox. To determine which one, simply edit the article:

{{Infobox connector
...
}}

The "{{Infobox connector" identifies the markup between the enclosing braces as a use of the "connector" infobox. The editor can look up the documentation for the template, including a list of parameters, in the Template namespace under Template:Infobox connector.

Editing the target article

In accordance with Misplaced Pages's Manual of Style, infoboxes should be placed at the top of an article after any disambiguation links and maintenance tags.

The infobox documentation page usually contains a convenient "blank" template that can be copied directly into the target article. The template consists of opening ({{) and closing (}}) double braces that contain the name of the infobox and a list of parameters without values. An editor then fills in the value for each of the parameters to the right of the corresponding equals sign.

For example:

{{Infobox person
| name               = 
| image              = 
| caption            = 
...
| website            = 
}}

might be filled out like this:

{{Infobox person
| name               = Casanova
| image              = Casanova self portrait.jpg
| caption            = A self-portrait of Casanova
...
| website            = 
}}

In this example, the names of the parameters ("name", "image", "caption", "website") are fixed in the design of the infobox and described in its documentation. A parameter that is misspelled, falsely capitalized, or is not supported by the infobox implementation does not display at all. To find out exactly which parameters are functional, look at the infobox's template page. Anything not listed there will be ignored, even if it works in some other infobox. If you believe that another parameter needs to be added to a given infobox template, then suggest that on the infobox's talk page.

The infobox documentation describes which parameters are required and which are optional. Required parameters display between triple braces (for example, {{{requiredparametername}}}) when previewed or published. Optional parameters may be left empty or omitted entirely.

Troubleshooting

If you added an infobox and it didn't display correctly, here are the common errors:

  • You used a made-up or invalid parameter. You can only use parameters that have been pre-programmed into this infobox template.
  • You misspelled the parameter name or omitted necessary punctuation (e.g., leaving out the underscore in birth_place).
  • You capitalized the parameter name. Parameters are case sensitive. Nearly all infoboxes use lowercase parameter labels.
  • You included the prefix File: before the image name (or you didn't, and it's one of the templates that requires it).
  • You used the parameter name more than once: only the final instance displays.

Adding an image to an infobox

Main page: Help:Infobox picture

Images are generally specified using the image and caption parameters. However, the template may use a different name for this parameter. For example, {{Infobox album}} uses "Cover" instead of "image" and "Caption" instead of "caption".

The image parameter sometimes requires the Misplaced Pages:Extended image syntax; other times it requires only the image file name depending on the tastes of the editor who created the infobox. An editor can determine this either by experimenting (using the "preview" function) or by consulting the infobox template documentation.

Many images in infoboxes should have a special text alternative for people who cannot see the image.

Combining multiple infoboxes

For detailed guidance on how combine multiple infoboxes, see Misplaced Pages:WikiProject Infoboxes/embed.

If an article requires two or more infoboxes it is often possible to combine them into one, by including the others as a module (or child-, or sub-template) of the first. Alternately, it can be useful to use {{stack}} as a container for them to prevent layout problems with other images and floating elements in the article.

Designing an infobox

For detailed guidance on how to design infoboxes, see Help:Designing infoboxes.

It is a good idea to seek the opinions of other editors before embarking on a design of a new infobox or redesign of an existing one. Most requirements are already met by an existing infobox and most of the remainder can be met with a tweak. Unnecessary duplication leads to clutter and article divergence. Prototype your new design in your own user space. Once prototyped, propose the infobox changes to the appropriate WikiProject and gain consensus before deploying your new design in the template namespace.

Deleting an infobox

Requests to delete an infobox should be brought to the attention of Misplaced Pages:Templates for discussion and any WikiProjects associated with the infobox. The WikiProject associated with the subject can usually be found at the top of the talk page of the article. A template may be merged with another rather than deleted outright.

Infoboxes and user style

Users can have user CSS that hides any infoboxes in their own browsers.

To hide all infoboxes, add the following to Special:MyPage/common.css (for all skins, or Special:MyPage/skin.css for just the current skin), on a line by itself:

div.mw-parser-output .infobox { display: none; }

Alternatively, you can add the following code to your common.js or into a browser user script that is executed by an extension like Greasemonkey:

$('.infobox').hide();

Be aware that although, per WP:Manual of Style/Infoboxes, all information in an infobox ideally should also be found in the main body of an article, there isn't perfect compliance with this guideline. For example, the full taxonomic hierarchy in {{Taxobox}}, and the OMIM and other medical database codes of {{Infobox disease}} are often not found in the main article content. The infobox is also often the location of the most significant, even only, image in an article. There is a userscript which removes infoboxes but moves the images contained to separate thumbnails: User:Maddy from Celeste/disinfobox.js.

See also

This page is referenced in the Misplaced Pages Glossary.
Find this page confusing? Just use this link to ask for help on your talk page; a volunteer will visit you there shortly!
Misplaced Pages help pages

About Misplaced Pages (?)
Help for readers (?)
Contributing
to Misplaced Pages
 (?)
Getting started (?)
Dos and don'ts (?)
How-to pages and
information pages (?)
Coding (?)
Directories (?)
Missing Manual
Ask for help on your talk page (?)
Categories: