Template:Navbox

From WikiLectures

Infobox info icon.svg Documentation   [=edit Edit] [Page history] [ empty memory]

This template is used to create horizontal navigation templates.

How to Use it[edit source]

For now, the English names of the parameters and some of their possible values are used. Their meanings are explained in this documentation.

{{Navbox
|name = {{subst:PAGEname}}
|title = 
|image = 
|above = 

|group1 = 
|list1 = 

|group2 = 
|list2 = 
 …
|group20 = 
|list20 = 

|under = 
}}

List of parameters[edit source]


All parameters in this template are lowercase. The required parameters are title and heading. If other parameters are omitted, a one-line navigation template is created.


Note that the group1 and other parameters are optional. Similarly, the above and under parameters are optional.

The basic and most used parameters are as follows (see below for a complete list):

title - navigation template name.
heading - heading, text in the header of the navigation template. For example: [[Inherited metabolic disorders]].
image - image on the right side of the navigation template, for example [[File:XX.jpg|90px|Caption]]. Don't forget a concise caption for the image.
imageleft - image on the left side of the navigation template.
above - Text that appears above the groups and lists section, for example a list of some general wikilinks.
listn - An enumeration with the number n. Usually contains a list of terms separated by a dot (•).
for example [[Inherited metabolic disorders]] • [[Inherited metabolic disorders of small molecules]] • [[Inherited metabolic disorders of complex molecules]] • [[Investigative Methods in Inherited Metabolic Disorders]] • [[Newborn screening]] • [[Screening for hereditary diseases]]
groupn - Text on the left side before the enumeration with the number n. If omitted, the enumeration starts on the far left.
under - The text that appears underparts with groups and enumerations.

Further details and limitations are explained in the ParameterDescription section. Other possible layouts are in the Layout section.

Parameter description[edit source]

This section contains the full list of template parameters {{Navbox}}. In most cases it is only necessary to fill in the parameters title, heading and list1.

Common settings[edit source]

title (title)
border (frame)
If this parameter is set to none (nothing), the navigation template can be used inside some other container (for example, a general table).
If this parameter is set to any other value, the result will be the default behavior, i.e. the nav template will have a border with a space.

Individual parts[edit source]

heading (heading)
the heading is the text that appears in the header of the entire template. It is usually a sufficient description of the template content. The heading is usually one line.
Technically, this parameter is not mandatory, but without it, the navigation template is meaningless. (Listingn)
The description refers to a number of parameters whose title differs only by a number, i.e. list1, list2, etc...; n can be at most 20.
The values of these parameters are the body of the template itself, usually a list of some items, usually links. It is necessary to include at least one list parameter for the template to have any content. Each additional list is another row of the table. For each listn there may be a parameter groupn, see below.
groupn (groupn)
The description refers to a series of parameters whose title differs only by a number, i.e. group1, group2, etc...; n can be at most 20.
If any of these parameters are filled, a cell describing the enumeration is displayed to the left of the enumeration. If this parameter is omitted for the enumeration, the enumeration is displayed across the full width of the navigation template.
image (image)
The parameter value is a reference to the image that appears to the right of the enumerations. The list1 parameter must be defined for the image to be displayed correctly.
The parameter can contain ordinary wikicode, for example
image = [[image:Example.jpg|100px|caption]]
Don't forget the picture description, it is an important part of the picture.
imageleft (left image)
The parameter value is a link to the image that appears to the left of the lists and groups. The list1 parameter must be defined for the image to be displayed correctly.
The parameter can contain common wikicode, for example
imageleft = [[image:Example.jpg|100px|caption]]
Don't forget the picture description, it is an important part of the picture.
above (above)
This parameter can be used to create the initial item of the navigation template above all groups, lists and images. It can be useful for underwriting or quoting the content of the template itself. Its text will be displayed across the full width of the navigation template.
under (under)
This parameter can be used to create the end item (footer) of the navigation template under all groups, lists and images. It can be useful for explanations or notes on the content of the template itself. Its text will be displayed across the full width of the navigation template.

Advanced parameters[edit source]

evenodd [swap, even, odd] (even odd [swap, even, odd])
If the value of this parameter is swap (swap), swapping the styles of even and odd enumerations. Usually, the even ones are a bit darker, this value will make them lighter.
If the value of this parameter is even (even) or odd (odd), all enumerations will have a background as even or odd enumerations, respectively.

Layout[edit source]

This section provides examples of the basic options that the user of this template has when selecting its elements.

Navbox with parameters image, above and under:


Navbox with parameters image, above and under:


Navbox with parameters image, imageleft, list and without group, above, under:


Examples[edit source]

Without an image[edit source]

{{Navbox
|title  = Navbox/documentation
|heading = [[Inherited metabolic disorders]]
|group1 = '''[[Inherited disorders of amino acid metabolism]]''', '''[[Organic aciduria]]''', '''[[Inherited disorders of urea cycle metabolism]]'''
|list1 = [[Phenylketonuria]] • [[Tyrosinemia]] • [[Alkaptonuria]] • [[Leucinosis]] • [[Isovaler aciduria]] • [[Cystinosis]] - [[Glutaric aciduria]] • [[Prolidase deficiency]] • [[Hyperornithinemia]] • [[Nonketotic hyperglycinemia]] • [[Ornithine transcarbamylase deficiency]]
|group2 = '''[[Inherited metabolic disorders of propionate, biotin, cobalamin metabolism]]'''
|list2 = [[Propionic acidemia]] • [[Methylmalonic acidemia]] • [[Biotinidase deficiency]]
}}


With an image, without groups[edit source]

{{Navbox
|title  = Navbox/documentation
|heading = [[Inherited disorders of lysosome metabolism]]
|image = [[File:Morbus Fabry kidney biopsy 02.jpg|60px|Fabry disease affecting ganglion cells]]
|list1 = [[Mucolipidosis]] II • [[Mucopolysaccharidosis]] III • [[Gaucher disease]] • [[Fabry disease]] • [[Niemann-Pick disease]] • 
[[Krabbe disease]] • [[Metachromatic leukodystrophy]] • [[Danon disease]] • [[Cystinosis]]
}}


With two images, without groups, with two lists[edit source]

{{Navbox
|title  = Navbox/documentation
|heading = [[Inherited disorders of lysosome metabolism]]
|image = [[File:Morbus Fabry kidney biopsy 02.jpg|60px|Fabry disease affecting ganglion cells]]
|imageleft = [[File:Morbus Fabry kidney biopsy 02.jpg|60px|kidney biopsy - Fabry's disease]]
|list1 = [[Mucolipidosis]] II • [[Mucopolysaccharidosis]] III • [[Gaucher disease]] • [[Fabry disease]] • [[Niemann-Pick disease]] •
[[Krabbe disease]] • [[Metachromatic leukodystrophy]] • [[Danon disease]] • [[Cystinosis]]
|list2 = [[Fructoaldolase deficiency]] • [[Fructose-1,6-bisphosphatase deficiency]] • [[Essential fructosuria]] - [[Galactose-1-phosphate uridyltransferase deficiency]] • [[Galactokinase deficiency]] • [[Glycogenosis]]
}}


With an image, groups, above and under[edit source]

{{Navbox
|title  = Navbox/documentation
|heading = [[Inherited metabolic disorders]]
|above = [[Inherited disorders]]
|image = [[File:Morbus Fabry kidney biopsy 02.jpg|60px|Fabry disease affecting ganglion cells]]
|group1 = [[Inherited disorders of lysosome metabolism]]
|list1= [[Mucolipidosis]] II • [[Mucopolysaccharidosis]] III • [[Gaucher disease]] • [[Fabry disease]] • [[Niemann-Pick disease]] - [[Krabbe disease]] • [[Metachromatic leukodystrophy]] • [[Danon disease]] • [[Cystinosis]]
|group2 = ''''[[Mitochondrial Diseases|Inherited Metabolic Disorders of Mitochondria]]'''
|list2 = [[Leigh syndrome]] • [[Chronic progressive external ophthalmoplegia]] • [[Kearns syndrome Sayre]] • [[Leber hereditary optic neuropathy]] • [[Maternally inherited diabetes and deafness]] • [[Pyruvate dehydrogenase deficiency]] • [[Pyruvate carboxylase deficiency]] • [[Phosphoenol carboxykinase deficiency]] • [[VLCAD deficiency]] • [[MCAD deficiency]] • [[SCAD deficiency]] • [[LCHAD deficiency]]
|under = [[Portal:Pathobiochemistry]]
}}


Embedded navboxes[edit source]

The navigation template can contain embedded navboxes. For a nested navbox, you need to define the first unnamed parameter as „descendant“ (descendant). The simple code can then look like this:

{{Navbox
|title = {{subst:PAGEname}}
|heading = heading
...parameters of the external navbox...
|list1 = {{Navbox|descendant
   ...parameters of embedded navbox...
 }}
...the parameters of the external navbox continue here
}}

Example of an embedded navbox[edit source]

In this section you will find examples with embedded navboxes. Note that the evenodd (even odd) parameter is used to swap the bars in some nested navboxes.

{{Navbox
|title = Navbox/documentation
|image = 
|heading = Example with several embedded navboxes
|above = above
|under = under

|group1 = group1
|list1 = list1
|group2 = group2
|list2 = 
 {{Navbox|descendant
  |evenodd = swap
  |group1 = group1 embedded
  |list1 = list1 embedded
  |group2 = group2 embedded
  |list2 = list2 embedded
  |group3 = group3 embedded
  |list3 = list3 embedded
 }}

|group3 = group3
|list3 = list3

|group4 = group4
|list4 = 
 {{Navbox|descendant
  |evenodd = swap
  |group1 = group1 of the second embedded
  |list1 = list1 of the second embedded
  |group2 = group2 of the second embedded
  |list2 = list2 of the second embedded
  |group3 = group3 of the second embedded
  |list3 = list3 of the second embedded
 }}
}}


Source and technical details[edit source]

  • This template including most of the documentation was taken from the Czech Wikipedia 9.8.2014, see original here.
  • You can see the CSS classes that define the navbox appearance at MediaWiki:common.css