Template:Infobox element
| Infobox element, 00Xx | |
|---|---|
Some attributes
| |
| First | Unknown |
| Second | Unknown |
| Third | Unknown |
Other attributes
| |
| Template documentation follows |
|---|
| Note: the template above may sometimes be partially or fully invisible. |
| Visit "Template:Infobox element/doc" to edit its documentation if it is available. (How does this work?) |
| This template adds an automatically generated short description (chemical elements). If the automatic short description is not desired, override it by adding {{Short description}} at the top of the article. |
| This template uses Lua: |
Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Uses TemplateStyles.tab. Infoboxes for the chemical elements use the meta template {{Infobox element}} (talk).
Parameters
- In general
Usually parameters reproduce the value, and the template adds the SI unit or additional standard text. While the topic is technical, we can strive to make the result readable text, and even verbose. For example, this is why the template writes "(at 0 °C)". For this, you may want to experiment with parameter input too - or propose improvements.
All this can vary across the values (data rows). So depending on the row and the specific value, additional formattings may be added by the template (e.g., a newline <br/>)
- Central data values
Some data, like standard atomic weight, are read from a central list. This way, enwiki has the same values everywhere. See § Chemical element data sets for more.
- Parameter naming patterns
Most parameters have a ... ref that allows for references. This reference is added right after the unit.
ionization energy ref
Parameters with a .. comment suffix are added to the end of a data line, with a space added. Comments are reproduced without formatting additions (no brackets, no italics, ...):
ionization energy comment
Numbered values make a list:
ionization energyionization energy 2ionization energy 3
Parameter list
| ||
|---|---|---|
|
This parameter list:
|
Chemical element data sets
Infobox element reads data from these lists (i.e., not by local parameter)
| Data sets read by {{Infobox element}} | |
|---|---|
| Name and identifiers | |
| Symbol etymology (11 non-trivial) | |
| Top image (caption, alt) | caption: alt: |
| Pronunciation | |
| Allotropes (overview) | |
| Group (overview) | |
| Period (overview) | |
| Block (overview) | |
| Natural occurrence | |
| Phase at STP | |
| Oxidation states | |
| Spectral lines image | |
| Electron configuration (cmt, ref) | |
| Isotopes | |
| Standard atomic weight | |
| most stable isotope | |
| Wikidata * | |
| * Not used in {{Infobox element}} (2023-01-01) See also {{Index of data sets}} · Cat:data sets (19) · (this table: ) | |
Main isotopes box
As of 7 Jan 2023[update], the "Main isotopes of <element>" tabular list will be read directly from the Isobox: "Infobox <element> isotopes". For example, {{Infobox uranium}} will read the table live from {{Infobox uranium isotopes}}.
The headerbar provides View-Edit links to that Isobox.
- Main isotopes of uranium
Reused Main Isotopes table listed in Category:Infobox element isotopes templates (1).
Theoretical elements handling (E119)
As of 1 Jan 2023[update], elements E119 and higher are not discovered. These are called theoretical elements. They can have article and other content pages though. Incidentally, this concerns period 8 completely. For the Infobox <element>, their redirected pages do not count (are treated as: "R page does not exist").
Possible situations regarding articles & discovery, are:
- "E118": E1–E118, discovered, existing full set, mentioned here for easy reference
- "E119": E119, E120
- "E121": E121, E122, E124, E126
- "E127, E185": E123, E125, E127 ... Unbitrium Redirect: no article, no other content pages.
Creation of pages is governed by MOS:NONEWELEMENTS. This infobox must distinguish between three typical (exemplary) elements: E118 (regular element), E119 and E121.
Handling of these element infoboxes is hardcoded in the meta-infobox, set by |number= (Z).
- Theoretical element: above-header shows
- Theoretical element
- Applied: when element is theoretical (E119 and higher).
- No article "Isotopes of <element>": Header does not link
- E119: Main isotopes of ununennium
- E121: Main isotopes of unbiunium
- Applied: E119, E120 do link, E121 and higher do not link.
- No isotopes known, Isobox does not exist: local input, per Infobox. For example:
- Transclusion of the isobox is suppressed (no redlink),
- E119:
|theoretical isotopes comment=Experiments and theoretical calculations
- Applied: E119 and up: have no Isobox, so no isotopes lists is shown—at all. Instead, the parametertext is shown as present.
Subtemplates
These subtemplates are used automatically; they do not need specific editor's input.
- {{Infobox element/pronunciation}} (data)
- {{Infobox element/standard atomic weight format}}
- {{Infobox element/block format}}
- {{Infobox element/periodic table}} (extends period 8 when atomic number ≥ 119. See {{Infobox ununennium}}).
- {{Infobox element/spectral lines}}
- {{Infobox element/vapor pressure table}}
- {{Infobox element/crystal structure}}
English variant spellings (ENGVAR)
All element articles and their infoboxes use IUPAC spelling of elements and compounds. Notably, that is aluminium, sulfur, caesium, not aluminum, sulphur, cesium. For other English variant words (vapor vs. vapour) the infobox reads |engvar=. The parameter should be set in the article, and has options: en-US (or blank; default), en-GB, en-OED.
| parameter | en-US (default) |
en-GB | en-OED |
|---|---|---|---|
| color | color | coloUr | coloUr |
| heat vaporization | vaporiZation | vaporiSation | vaporiZation |
| vapor pressure | vapor | vapoUr | vapoUr |
| ionization energy | ioniZation | ioniSation | ioniZation |
| crystal structure (list) | -centEred | -centred | -centred |
| ... oxidation-state/comment | parenthesized | brackets | brackets |
Note, what is shown in the infobox is not influenced by the parameter name spelling, nor its input value.
Articles having engvar set: see Category:WikiProject Elements pages using ENGVAR (0)
TemplateData
TemplateData for Infobox element
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Z | Z | no description | Unknown | optional |
| symbol | symbol | no description | Unknown | optional |
| name | name | no description | Unknown | optional |
| image name | image name | no description | Unknown | optional |
| image upright | image upright | no description | Unknown | optional |
| proposed name | proposed name | no description | Unknown | optional |
| alt names | alt names | no description | Unknown | optional |
| alt name | alt name | no description | Unknown | optional |
| appearance | appearance | no description | Unknown | optional |
| mass number comment | mass number comment | no description | Unknown | optional |
| abundance | abundance | no description | Unknown | optional |
| abundance in earth's crust | abundance in earth's crust | no description | Unknown | optional |
| abundance in oceans | abundance in oceans | no description | Unknown | optional |
| abundance in solar system | abundance in solar system | no description | Unknown | optional |
| above | above | no description | Unknown | optional |
| below | below | no description | Unknown | optional |
| left | left | no description | Unknown | optional |
| right | right | no description | Unknown | optional |
| group ref | group ref | no description | Unknown | optional |
| group comment | group comment | no description | Unknown | optional |
| period ref | period ref | no description | Unknown | optional |
| period comment | period comment | no description | Unknown | optional |
| block ref | block ref | no description | Unknown | optional |
| block comment | block comment | no description | Unknown | optional |
| electron configuration comment | electron configuration comment | no description | Unknown | optional |
| electrons per shell | electrons per shell | no description | Unknown | optional |
| electrons per shell ref | electrons per shell ref | no description | Unknown | optional |
| electrons per shell comment | electrons per shell comment | no description | Unknown | optional |
| physical properties comment | physical properties comment | no description | Unknown | optional |
| physical properties | physical properties | no description | Unknown | optional |
| engvar | engvar | no description | Unknown | optional |
| color | color | no description | Unknown | optional |
| phase | phase | no description | Unknown | optional |
| phase comment | phase comment | no description | Unknown | optional |
| density conditions | density conditions | no description | Unknown | optional |
| density | density | no description | Unknown | optional |
| density gplstp | density gplstp | no description | Unknown | optional |
| density gplstp ref | density gplstp ref | no description | Unknown | optional |
| density gplstp comment | density gplstp comment | no description | Unknown | optional |
| density gpcm3nrt | density gpcm3nrt | no description | Unknown | optional |
| density gpcm3nrt ref | density gpcm3nrt ref | no description | Unknown | optional |
| density gpcm3nrt comment | density gpcm3nrt comment | no description | Unknown | optional |
| density gpcm3nrt 2 | density gpcm3nrt 2 | no description | Unknown | optional |
| density gpcm3nrt 2 ref | density gpcm3nrt 2 ref | no description | Unknown | optional |
| density gpcm3nrt 2 comment | density gpcm3nrt 2 comment | no description | Unknown | optional |
| density gpcm3nrt 3 | density gpcm3nrt 3 | no description | Unknown | optional |
| density gpcm3nrt 3 ref | density gpcm3nrt 3 ref | no description | Unknown | optional |
| density gpcm3nrt 3 comment | density gpcm3nrt 3 comment | no description | Unknown | optional |
| density gpcm3mp | density gpcm3mp | no description | Unknown | optional |
| density gpcm3mp ref | density gpcm3mp ref | no description | Unknown | optional |
| density gpcm3mp comment | density gpcm3mp comment | no description | Unknown | optional |
| density gpcm3bp | density gpcm3bp | no description | Unknown | optional |
| density gpcm3bp ref | density gpcm3bp ref | no description | Unknown | optional |
| density gpcm3bp comment | density gpcm3bp comment | no description | Unknown | optional |
| critical point K | critical point K | no description | Unknown | optional |
| critical point MPa | critical point MPa | no description | Unknown | optional |
| critical point ref | critical point ref | no description | Unknown | optional |
| critical point comment | critical point comment | no description | Unknown | optional |
| heat fusion | heat fusion | no description | Unknown | optional |
| heat fusion ref | heat fusion ref | no description | Unknown | optional |
| heat fusion comment | heat fusion comment | no description | Unknown | optional |
| heat fusion 2 | heat fusion 2 | no description | Unknown | optional |
| heat fusion 2 ref | heat fusion 2 ref | no description | Unknown | optional |
| heat fusion 2 comment | heat fusion 2 comment | no description | Unknown | optional |
| heat vaporization | heat vaporization | no description | Unknown | optional |
| heat vaporization ref | heat vaporization ref | no description | Unknown | optional |
| heat vaporization comment | heat vaporization comment | no description | Unknown | optional |
| heat capacity | heat capacity | no description | Unknown | optional |
| heat capacity ref | heat capacity ref | no description | Unknown | optional |
| heat capacity comment | heat capacity comment | no description | Unknown | optional |
| heat capacity 2 | heat capacity 2 | no description | Unknown | optional |
| heat capacity 2 ref | heat capacity 2 ref | no description | Unknown | optional |
| heat capacity 2 comment | heat capacity 2 comment | no description | Unknown | optional |
| vapor pressure 1 | vapor pressure 1 | no description | Unknown | optional |
| vapor pressure 100 k | vapor pressure 100 k | no description | Unknown | optional |
| vapor pressure ref | vapor pressure ref | no description | Unknown | optional |
| vapor pressure comment | vapor pressure comment | no description | Unknown | optional |
| vapor pressure 10 | vapor pressure 10 | no description | Unknown | optional |
| vapor pressure 100 | vapor pressure 100 | no description | Unknown | optional |
| vapor pressure 1 k | vapor pressure 1 k | no description | Unknown | optional |
| vapor pressure 10 k | vapor pressure 10 k | no description | Unknown | optional |
| vapor pressure 1 2 | vapor pressure 1 2 | no description | Unknown | optional |
| vapor pressure 100 k 2 | vapor pressure 100 k 2 | no description | Unknown | optional |
| vapor pressure 2 ref | vapor pressure 2 ref | no description | Unknown | optional |
| vapor pressure 2 comment | vapor pressure 2 comment | no description | Unknown | optional |
| vapor pressure 10 2 | vapor pressure 10 2 | no description | Unknown | optional |
| vapor pressure 100 2 | vapor pressure 100 2 | no description | Unknown | optional |
| vapor pressure 1 k 2 | vapor pressure 1 k 2 | no description | Unknown | optional |
| vapor pressure 10 k 2 | vapor pressure 10 k 2 | no description | Unknown | optional |
| atomic properties comment | atomic properties comment | no description | Unknown | optional |
| atomic properties | atomic properties | no description | Unknown | optional |
| electronegativity | electronegativity | no description | Unknown | optional |
| electronegativity ref | electronegativity ref | no description | Unknown | optional |
| electronegativity comment | electronegativity comment | no description | Unknown | optional |
| ionization energy 1 | ionization energy 1 | no description | Unknown | optional |
| ionization energy 1 ref | ionization energy 1 ref | no description | Unknown | optional |
| ionization energy 1 comment | ionization energy 1 comment | no description | Unknown | optional |
| ionization energy 2 | ionization energy 2 | no description | Unknown | optional |
| ionization energy 2 ref | ionization energy 2 ref | no description | Unknown | optional |
| ionization energy 2 comment | ionization energy 2 comment | no description | Unknown | optional |
| ionization energy 3 | ionization energy 3 | no description | Unknown | optional |
| ionization energy 3 ref | ionization energy 3 ref | no description | Unknown | optional |
| ionization energy 3 comment | ionization energy 3 comment | no description | Unknown | optional |
| number of ionization energies | number of ionization energies | no description | Unknown | optional |
| ionization energy ref | ionization energy ref | no description | Unknown | optional |
| ionization energy comment | ionization energy comment | no description | Unknown | optional |
| atomic radius | atomic radius | no description | Unknown | optional |
| atomic radius ref | atomic radius ref | no description | Unknown | optional |
| atomic radius comment | atomic radius comment | no description | Unknown | optional |
| atomic radius calculated | atomic radius calculated | no description | Unknown | optional |
| atomic radius calculated ref | atomic radius calculated ref | no description | Unknown | optional |
| atomic radius calculated comment | atomic radius calculated comment | no description | Unknown | optional |
| covalent radius | covalent radius | no description | Unknown | optional |
| covalent radius ref | covalent radius ref | no description | Unknown | optional |
| covalent radius comment | covalent radius comment | no description | Unknown | optional |
| Van der Waals radius | Van der Waals radius | no description | Unknown | optional |
| Van der Waals radius ref | Van der Waals radius ref | no description | Unknown | optional |
| Van der Waals radius comment | Van der Waals radius comment | no description | Unknown | optional |
| crystal structure prefix | crystal structure prefix | no description | Unknown | optional |
| crystal structure | crystal structure | no description | Unknown | optional |
| crystal structure comment | crystal structure comment | no description | Unknown | optional |
| crystal structure ref | crystal structure ref | no description | Unknown | optional |
| lattice constant | lattice constant | no description | Unknown | optional |
| lattice constants | lattice constants | no description | Unknown | optional |
| crystal structure Pearson symbol | crystal structure Pearson symbol | no description | Unknown | optional |
| crystal structure 2 prefix | crystal structure 2 prefix | no description | Unknown | optional |
| crystal structure 2 | crystal structure 2 | no description | Unknown | optional |
| crystal structure 2 comment | crystal structure 2 comment | no description | Unknown | optional |
| crystal structure 2 ref | crystal structure 2 ref | no description | Unknown | optional |
| lattice constant 2 | lattice constant 2 | no description | Unknown | optional |
| lattice constants 2 | lattice constants 2 | no description | Unknown | optional |
| crystal structure 2 Pearson symbol | crystal structure 2 Pearson symbol | no description | Unknown | optional |
| thermal expansion | thermal expansion | no description | Unknown | optional |
| thermal expansion comment | thermal expansion comment | no description | Unknown | optional |
| thermal expansion ref | thermal expansion ref | no description | Unknown | optional |
| thermal expansion at 25 | thermal expansion at 25 | no description | Unknown | optional |
| thermal expansion at 25 ref | thermal expansion at 25 ref | no description | Unknown | optional |
| thermal expansion at 25 comment | thermal expansion at 25 comment | no description | Unknown | optional |
| thermal conductivity | thermal conductivity | no description | Unknown | optional |
| thermal conductivity ref | thermal conductivity ref | no description | Unknown | optional |
| thermal conductivity comment | thermal conductivity comment | no description | Unknown | optional |
| thermal conductivity 2 | thermal conductivity 2 | no description | Unknown | optional |
| thermal conductivity 2 ref | thermal conductivity 2 ref | no description | Unknown | optional |
| thermal conductivity 2 comment | thermal conductivity 2 comment | no description | Unknown | optional |
| thermal diffusivity | thermal diffusivity | no description | Unknown | optional |
| thermal diffusivity ref | thermal diffusivity ref | no description | Unknown | optional |
| thermal diffusivity comment | thermal diffusivity comment | no description | Unknown | optional |
| electrical resistivity | electrical resistivity | no description | Unknown | optional |
| electrical resistivity unit prefix | electrical resistivity unit prefix | no description | Unknown | optional |
| electrical resistivity ref | electrical resistivity ref | no description | Unknown | optional |
| electrical resistivity comment | electrical resistivity comment | no description | Unknown | optional |
| electrical resistivity at 0 | electrical resistivity at 0 | no description | Unknown | optional |
| electrical resistivity at 0 ref | electrical resistivity at 0 ref | no description | Unknown | optional |
| electrical resistivity at 0 comment | electrical resistivity at 0 comment | no description | Unknown | optional |
| electrical resistivity at 20 | electrical resistivity at 20 | no description | Unknown | optional |
| electrical resistivity at 20 ref | electrical resistivity at 20 ref | no description | Unknown | optional |
| electrical resistivity at 20 comment | electrical resistivity at 20 comment | no description | Unknown | optional |
| band gap | band gap | no description | Unknown | optional |
| band gap ref | band gap ref | no description | Unknown | optional |
| band gap comment | band gap comment | no description | Unknown | optional |
| Curie point K | Curie point K | no description | Unknown | optional |
| Curie point ref | Curie point ref | no description | Unknown | optional |
| Curie point comment | Curie point comment | no description | Unknown | optional |
| magnetic ordering | magnetic ordering | no description | Unknown | optional |
| magnetic ordering ref | magnetic ordering ref | no description | Unknown | optional |
| magnetic ordering comment | magnetic ordering comment | no description | Unknown | optional |
| magnetic susceptibility | magnetic susceptibility | no description | Unknown | optional |
| magnetic susceptibility ref | magnetic susceptibility ref | no description | Unknown | optional |
| tensile strength | tensile strength | no description | Unknown | optional |
| tensile strength ref | tensile strength ref | no description | Unknown | optional |
| tensile strength comment | tensile strength comment | no description | Unknown | optional |
| Young's modulus | Young's modulus | no description | Unknown | optional |
| Young's modulus ref | Young's modulus ref | no description | Unknown | optional |
| Young's modulus comment | Young's modulus comment | no description | Unknown | optional |
| Shear modulus | Shear modulus | no description | Unknown | optional |
| Shear modulus ref | Shear modulus ref | no description | Unknown | optional |
| Shear modulus comment | Shear modulus comment | no description | Unknown | optional |
| Bulk modulus | Bulk modulus | no description | Unknown | optional |
| Bulk modulus ref | Bulk modulus ref | no description | Unknown | optional |
| Bulk modulus comment | Bulk modulus comment | no description | Unknown | optional |
| speed of sound | speed of sound | no description | Unknown | optional |
| speed of sound ref | speed of sound ref | no description | Unknown | optional |
| speed of sound comment | speed of sound comment | no description | Unknown | optional |
| speed of sound rod at 20 | speed of sound rod at 20 | no description | Unknown | optional |
| speed of sound rod at 20 ref | speed of sound rod at 20 ref | no description | Unknown | optional |
| speed of sound rod at 20 comment | speed of sound rod at 20 comment | no description | Unknown | optional |
| speed of sound rod at r.t. | speed of sound rod at r.t. | no description | Unknown | optional |
| speed of sound rod at r.t. ref | speed of sound rod at r.t. ref | no description | Unknown | optional |
| speed of sound rod at r.t. comment | speed of sound rod at r.t. comment | no description | Unknown | optional |
| Poisson ratio | Poisson ratio | no description | Unknown | optional |
| Poisson ratio ref | Poisson ratio ref | no description | Unknown | optional |
| Poisson ratio comment | Poisson ratio comment | no description | Unknown | optional |
| Mohs hardness | Mohs hardness | no description | Unknown | optional |
| Mohs hardness ref | Mohs hardness ref | no description | Unknown | optional |
| Mohs hardness comment | Mohs hardness comment | no description | Unknown | optional |
| Mohs hardness 2 | Mohs hardness 2 | no description | Unknown | optional |
| Mohs hardness 2 ref | Mohs hardness 2 ref | no description | Unknown | optional |
| Mohs hardness 2 comment | Mohs hardness 2 comment | no description | Unknown | optional |
| Vickers hardness | Vickers hardness | no description | Unknown | optional |
| Vickers hardness ref | Vickers hardness ref | no description | Unknown | optional |
| Vickers hardness comment | Vickers hardness comment | no description | Unknown | optional |
| Brinell hardness | Brinell hardness | no description | Unknown | optional |
| Brinell hardness ref | Brinell hardness ref | no description | Unknown | optional |
| Brinell hardness comment | Brinell hardness comment | no description | Unknown | optional |
| CAS number | CAS number | no description | Unknown | optional |
| CAS number ref | CAS number ref | no description | Unknown | optional |
| CAS number comment | CAS number comment | no description | Unknown | optional |
| naming | naming | no description | Unknown | optional |
| predicted by | predicted by | no description | Unknown | optional |
| prediction date | prediction date | no description | Unknown | optional |
| discovered by | discovered by | no description | Unknown | optional |
| discovery date | discovery date | no description | Unknown | optional |
| first isolation by | first isolation by | no description | Unknown | optional |
| first isolation date | first isolation date | no description | Unknown | optional |
| named by | named by | no description | Unknown | optional |
| named date | named date | no description | Unknown | optional |
| history comment | history comment | no description | Unknown | optional |
| prediction date ref | prediction date ref | no description | Unknown | optional |
| discovery and first isolation by | discovery and first isolation by | no description | Unknown | optional |
| discovery date ref | discovery date ref | no description | Unknown | optional |
| first isolation date ref | first isolation date ref | no description | Unknown | optional |
| named date ref | named date ref | no description | Unknown | optional |
| history comment label | history comment label | no description | Unknown | optional |
| theoretical isotopes comment | theoretical isotopes comment | no description | Unknown | optional |
| number | number | no description | Unknown | optional |
| standard atomic weight ref | standard atomic weight ref | no description | Unknown | optional |
| melting point K | melting point K | no description | Unknown | optional |
| melting point prefix | melting point prefix | no description | Unknown | optional |
| melting point C | melting point C | no description | Unknown | optional |
| melting point F | melting point F | no description | Unknown | optional |
| melting point ref | melting point ref | no description | Unknown | optional |
| melting point comment | melting point comment | no description | Unknown | optional |
| boiling point K | boiling point K | no description | Unknown | optional |
| boiling point prefix | boiling point prefix | no description | Unknown | optional |
| boiling point C | boiling point C | no description | Unknown | optional |
| boiling point F | boiling point F | no description | Unknown | optional |
| boiling point ref | boiling point ref | no description | Unknown | optional |
| boiling point comment | boiling point comment | no description | Unknown | optional |
| sublimation point K | sublimation point K | no description | Unknown | optional |
| sublimation point C | sublimation point C | no description | Unknown | optional |
| sublimation point F | sublimation point F | no description | Unknown | optional |
| sublimation point ref | sublimation point ref | no description | Unknown | optional |
| sublimation point comment | sublimation point comment | no description | Unknown | optional |
| molar volume | molar volume | no description | Unknown | optional |
| molar volume unit | molar volume unit | no description | Unknown | optional |
| molar volume ref | molar volume ref | no description | Unknown | optional |
| molar volume comment | molar volume comment | no description | Unknown | optional |
| triple point K | triple point K | no description | Unknown | optional |
| triple point kPa | triple point kPa | no description | Unknown | optional |
| triple point ref | triple point ref | no description | Unknown | optional |
| triple point comment | triple point comment | no description | Unknown | optional |
| triple point K 2 | triple point K 2 | no description | Unknown | optional |
| triple point kPa 2 | triple point kPa 2 | no description | Unknown | optional |
| triple point 2 ref | triple point 2 ref | no description | Unknown | optional |
| triple point 2 comment | triple point 2 comment | no description | Unknown | optional |
References
See also
- {{Infobox element/element navigation}} (
|symbol=, useful links in top of this page)
Tracking categories
- Category:Element infobox templates that need attention (0)
- Category:Pages using infobox element with unknown parameters (0)
Index by periodic table
Chemical element data sets | |
|---|---|
| ID |
- Template:Infobox element invokes Module:Navbox using Lua.
Usage
This template can be used to make a standard navigation box. It is intended for use within another template that standardises the title and contents of the box (see Template:ShipNavbox). This template SHOULD NOT be used directly within articles, as it creates a maintenance burden to do so whenever the contents of the box have to be updated.
The purpose of this template is to standardise the attributes of all navigation boxes, for example, their colours and other CSS attributes. The template is fairly simple, and could be extended to add other features in the future. Using this template allows changes to be implemented much quicker and easier than editing each template separately.
Syntax
{{navbox
|state = uncollapsed, collapsed, plain, autocollapse (default)
|name = mandatory - name of the template
|style = optional - style for the whole table
|title = mandatory - navbox header
|gtitleN = optional - title of N-th group of items
|styleN = optional - style for groupN; i.e. text-align
|groupN = mandatory - list of groups of items
|fstyle = optional - style for footer ; i.e. text-align
|footer = optional - navbox footer
}}
- Groups: Currently there is no technical limit to the maximum number of groups.
- Groups of items can be added as parameters: group1, group2, group3, ... up to groupN.
- Group title: Each group has its own title parameter: gtitle1, gtitle2, gtitle3, ... up to gtitleN. Note that the default width for the first column is 15%.
- Group style: Style may also be customised to each group in: style1, style2, style3, ... up to styleN.
- Note that neither the title nor the items have any wiki-links built into the template. As a result, users of the template are free to use wiki-links as they wish.
- Line breaks: Line-breaks (
<br />) are unnecessary, as text wrapping is done automatically by the template. This also includes links and text in gtitleN and groupN. - Bullets: Create unordered lists with lines beginning with *.
- Pipe links: Because of the nature of template syntax, it may be necessary to use Template:! (
{{!}}).
States
- Autocollapse: By default, the state of a navbox is "autocollapsed". This means that if the number of navboxes in a page exceeds the maximum allocation of the collapsible navboxes, then the remaining navboxes are collapsed automatically. For more information (or to change the setting), see MediaWiki:Common.js.
- Currently, the autocollapse allocation is 2 (see MediaWiki:Common.js). This means that if there are 3 navboxes in a page, the third and subsequent navboxes will be collapsed automatically.
- Uncollapsed: Forces the navbox to be displayed.
- All of the navboxes in this documentation are in the uncollapsed state.
- Collapsed: The reverse of uncollapsed. Forces the navbox to be hidden instead.
- Navboxes with a height of more than 300 pixels will also be collapsed automatically. For more information (or to change the setting), see MediaWiki:Common.js.
- Plain: Removes the "show/hide" link.
Sub-groups
- For larger navboxes, it may be necessary to include sub-groups within a particular group of items. It is also possible to collapsible navboxes within the parent navbox, see Collapsible sub-groups.
- To create sub-groups within
{{navbox}}, certain parameters are to be included:- The parent navbox group (i.e. group2 in the example below) requires the type parameter (gtype2 = Subgroup).
- The nested navbox (sub-group) requires the inclusion of the sub-group parameter (subgroup = yes). This enables the template to differentiate between the sub-group and the parent navbox.
{{navbox
|name =
|title =
|gtitle1 =
|group1 =
|gtitle2 =
|gtype2 = Subgroup (mandatory)
|group2 =
{{navbox
|subgroup = yes (mandatory)
|gtitle1 =
|group1 =
|gtitle2 =
|group2 =
}}
}}
Collapsible sub-groups
- For extremely long navboxes, it is recommended to use collapsible navboxes within the parent navbox. Further sub-groups can then be added to these collapsible navboxes.
- To create collapsible sub-groups within
{{navbox}}, these parameters need to be included:- The parent navbox is almost always uncollapsed (state=uncollapsed).
- The parent navbox group (i.e. group1 in the example below) requires the type parameter (gtype1 = Subgroup).
- The nested collapsible navbox requires the inclusion of the collapsible parameter (collapsible = yes). This enables the template to differentiate between the collapsible navbox and the parent navbox.
- The nested collapsible navbox is forcefully collapsed (state=collapsed).
{{navbox
|state = uncollapsed
|name =
|gtype1 = Subgroup
|group1 =
{{navbox
|collapsible = yes
|state = collapsed
|title =
|gtitle1 =
|group1 =
|gtitle2 =
|group2 =
}}
}}
Use of images
- The use of images in navboxes is permitted, but please resize the images to keep them small. Inventory-sized images (25-30 pixels) are recommended.
- Please use {{t|plink}} to create links with images. Use {{t|plink}} for any case where text is not desired after the link. It functions the same as {{t|plink}}, but it does not produce a wikilink in text. Use {{t|chatl}} to link chatheads. These templates create links for both the image and text (except for {{t|plink}}) using far less wikicode than the standard syntax.
Link and file share the same name
{{plink|Item}}
File name differs from the link
{{plink|Item|File}}
Link and file share the same name, but different text is desired to display
{{plink|Item|alt=Text}}
File name differs from the link and different text is desired to display
{{plink|Item|File|alt=Text}}
Categorising
Navboxes are very useful for transcluding categories onto a large number of pages that share both a trait and the navigation box. For example: Template:ShipNavbox transcludes Category:Ships onto every page that uses it.
There are 2 methods of categorising pages with navboxes:
The first way is with {{t|Ctg}}. This is the preferred method, and can be used in most cases. The rules and operations for the Category handler template are very simple; however, they are enough to produce the desired results on most pages.
Categorisation should only be used on a template for large-scale addition. It is unhelpful, for example, to use a rule that only applies to 1 page.
Examples
To see the following navboxes in action, see Template:Navbox.
Single line navbox with centered list
{{navbox
|name =
|title =
|style1 = text-align:center
|group1 =
}}
Navbox with standard footer
{{navbox
|name =
|title =
|gtitle1 =
|group1 =
|footer = Centered footer
}}
Navbox with styled footer
{{navbox
|name =
|title =
|gtitle1 =
|group1 =
|fstyle = text-align:right
|footer = Right-aligned footer
}}
Multiple line navbox
{{navbox
|name =
|title =
|gtitle1 = Group title 1
|group1 =
|gtitle2 = Group title 2
|group2 =
|gtitle3 = Group title 3
|group3 =
}}
Collapsed navbox
{{navbox
|state = collapsed
|name =
|title =
|style1 = text-align:center
|group1 =
}}
Plain navbox with Tnavbar
{{navbox
|state = plain
|name =
|title =
|style1 = text-align:center
|group1 =
}}
Plain navbox without Tnavbar
{{navbox
|state = plain
|title =
|style1 = text-align:center
|group1 =
}}
Complicated navbox
{{navbox
|state = uncollapsed
|name =
|title =
|gtitle1 = Level 1 Title 1
|group1 =
|gtitle2 = Level 1 Title 2
|group2 =
|gtitle3 = Level 1 Title 3
|group3 =
|gtitle4 = Level 1 Title 4
|group4 =
|gtitle5 = Level 1 Title 5
|gtype5 = Subgroup
|group5 =
{{navbox
|subgroup = Yes
|gtitle1 = Level 2 Title 1
|group1 =
|gtitle2 = Level 2 Title 2
|group2 =
|gtitle3 = Level 2 Title 3
|gtype3 = Subgroup
|group3 =
{{navbox
|subgroup = Yes
|gtitle1 = Level 3 Title 1
|group1 =
|gtitle2 = Level 3 Title 2
|group2 =
}}
|gtitle4 = Level 2 Title 4
|group4 =
}}
|gtitle6 = Level 1 Title 6
|group6 =
|gtitle7 = Level 1 Title 7
|group7 =
|fstyle =
|footer =
}}
Preventing unwanted documentation
The Navbox template's documentation is automatically transcluded under the navbox on any Template namespace page. It is not transcluded when used as a sub-group or collapsible sub-group template (subgroup= yes or collapsible=yes).
Should the documentation appear when it is unwanted, it can be hidden by setting the doc parameter doc=no on the template. In most cases, the doc parameter is NOT used and the parameter is removed completely.
Cite error: <ref> tags exist for a group named "Set", but no corresponding <references group="Set"/> tag was found