Template:Navbox

Hello, you have come here looking for the meaning of the word Template:Navbox. In DICTIOUS you will not only get to know all the dictionary meanings for the word Template:Navbox, but we will also tell you about its etymology, its characteristics and you will know how to say Template:Navbox in singular and plural. Everything you need to know about the word Template:Navbox you have here. The definition of the word Template:Navbox will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofTemplate:Navbox, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.
A user suggests that this Undetermined template be moved, merged or split, giving the reason: “No idea why there are both templates existing where the only difference is lower and upper cases on N/n.”.
Please see the discussion on Requests for moves, mergers and splits(+) or the talk page for more information and remove this template after the request has been fulfilled.


Usage

This template is used for creating navigation boxes, chiefly to link related templates together.

Parameters

Basic parameters
  • |name=mandatory: the name of the navigation box, which should be the same as the template name. This is needed for the "V • T • E" ("View • Talk • Edit") links to work properly on all pages where the template is used. You can specify |name={{subst:PAGENAME}} as a shortcut. The name parameter is only mandatory if |title= is specified, and the |border= parameter is not set, and the |navbar= parameter is not used to disable the navbar.
  • |title= – the title of the navigation box which appears in the title bar.
  • |above= – a comment which appears at the top of the navigation box.
  • |group1= to |group20= – the name of a group of entries which is displayed in a header cell to the left of the entries specified using |listN=. If this parameter is omitted, |listN= uses the full width of the table.
  • |list1= to |list20=mandatory: the list of entries. The format is inline, although the text can be entered on separate lines if the entire list is enclosed within <div> tags. At least one |list= parameter is required; each additional list is displayed in a separate row of the table. Each list may be preceded by a corresponding |groupN= parameter.
If arranging entries in a bulleted list, each entry should be begin with an asterisk (*) and be separated from the next entry using a newline. If two asterisks are used, nesting within the previous entry occurs by enclosing the entry with brackets. Increasing the number of asterisks used increases the number of brackets around entries.
If using inline child navigation boxes, specify |listN=child or |listN=subgroup. See "Setting child navigation boxes" below.
  • |below= – a comment which appears at the bottom of the navigation box.
Formatting parameters
  • |state= – the state in which the navigation box will be displayed. The parameter takes the following values:
    • autocollapse: this is the default state, if there are two or more collapsible elements on the same page. Otherwise, the navigation box will be expanded. (For technical details, see MediaWiki:Common.js—search for "autocollapse").
    • collapsed: for the navigation box to be displayed in a collapsed state.
    • expanded: for the navigation box to be displayed in an expanded state.
    • plain: for the navigation box to be displayed in an expanded state with no "" link on the right.
    • off: for the navigation box will always be expanded with no "" link on the right, and no padding to keep the title centred. This is for advanced use only; the plain option should suffice for most applications where the ""/"" button needs to be hidden.
For further details, see "w:Template:Navbox".
  • |navbar= – if |navbar=plain is specified, the V • T • E links on the left side of the titlebar will not be displayed, and padding will be automatically used to keep the title centered. Specify |navbar=off to remove the V • T • E links, but not apply padding (this is for advanced use only; the "plain" option should suffice for most applications where a navbar is not desired). It is highly recommended that one not hide the navbar, in order to make it easier for users to edit the template, and to keep a standard style across pages.
  • |border= – if |border=child or |border=subgroup is specified, then the navigation box can be used as a borderless child box that fits snugly in another navigation box. The border is hidden and there is no padding on the sides of the table, so it fits into the list area of its parent navigation box. If |border=none is specified, then the border is hidden and padding is removed, and the navigation box may be used as a child of another container (do not use the none option inside of another navigation box; similarly, only use the child or subgroup option inside of another navigation box). If set to anything else (default), then a regular navigation box is displayed with a 1px border. An alternate way to specify the border to be a subgroup style is like this to use the first unnamed parameter instead of the named border parameter, like this: |Navbox=child (...). See "Setting child navigation boxes" below.
  • |image= or |imageleft= – an image on the right or left side of the navigation box, like this: |image=].
  • |titlestyle=CSS styles to apply to |title=, most often the titlebar's background colour:
    |titlestyle=background: #nnnnnn;
    |titlestyle=background: name;
    |titlestyle=background: none; — for no background colour
  • |groupstyle= to |group20style= – a CSS style for the group cells, such as: |groupstyle=background: #eee;
  • |bodystyle= – specifies CSS styles to apply to the template body. This option should be used sparingly as it can lead to visual inconsistencies. Examples:
    |bodystyle=background: #nnnnnn;
    |bodystyle=width: N ;
    |bodystyle=float: ;
    |bodystyle=clear: ;
  • |basestyle= – CSS styles to apply to the title, above, below, and group cells all at once. The styles are not applied to list cells. This is convenient for easily changing the basic colour of the navigation box without having to repeat the style specifications for the different parts of the navigation box. Example: |basestyle=background: lightskyblue;
  • |groupstyle= – CSS styles to apply to the groupN cells. This option overrides any styles that are applied to the entire table. Examples:
    |groupstyle=background: #nnnnnn;
    |groupstyle=text-align: ;
    |groupstyle=vertical-align: ;
  • |groupNstyle= – CSS styles to apply to a specific group, in addition to any styles specified by the |groupstyle= parameter. This parameter should only be used when absolutely necessary in order to maintain standardization and simplicity. Example: |group3style=background: red; colour: white;.
  • |groupwidth= – a number and unit specifying a uniform width for the group cells, in cases where little content in the list cells may cause group cells to be too wide. No default. However, this may be overridden by the |groupNstyle= parameter. Example: |groupwidth=9em.
  • |liststyle= – CSS styles to apply to all lists. Overruled by the |oddstyle= and |evenstyle= parameters if specified. When using background colours in the navigation box, see the note hereafter.
  • |listNstyle= – CSS styles to apply to a specific list, in addition to any styles specified by the |liststyle= parameter. This parameter should only be used when absolutely necessary in order to maintain standardization and simplicity. Example: |list5style=background: #ddddff;.
  • |listpadding= – a number and unit specifying the padding in each list cell. The list cells come equipped with a default padding of 0.25em on the left and right, and 0 on the top and bottom. Due to complex technical reasons, simply setting |liststyle=padding: 0.5em; (or any other padding setting) will not work. Examples:
    |listpadding=0.5em 0; – sets 0.5em padding for the top/bottom, and 0 padding for the left/right.
    |listpadding=0; (removes all list padding.)
  • |oddstyle= and |evenstyle= – applies to odd and even list numbers. Overrules styles defined by |liststyle=. The default behaviour is to add striped colours (white and gray) to odd and even rows respectively, in order to improve readability. These should not be changed except in extraordinary circumstances.
  • |evenodd= – this takes the values swap, even, odd, and off. If set to swap, the automatic striping of even and odd rows is reversed. Normally, even rows get a light gray background for striping; when this parameter is used, the odd rows receive the gray striping instead of the even rows. The values even or odd sets all rows to have that striping colour. Setting off disables automatic row striping.
  • |abovestyle= and |belowstyle= – CSS styles to apply to the top cell (specified using the |above= parameter) and bottom cell (specified using the |below= parameter). Typically used to set background colour or text alignment:
    |abovestyle=background: #nnnnnn;
    |abovestyle=text-align: ;
    |belowstyle=background: #nnnnnn;
    |belowstyle=text-align: ;
  • |imagestyle= and |imageleftstyle= – CSS styles to apply to the cells where the right- or left-aligned image sits. These styles should only be used in exceptional circumstances, usually to fix width problems if the width of groups is set and the width of the image cell grows too large. Example: |imagestyle=width:5em;.

Setting child navigation boxes

It is possible to place multiple navboxes within a single border. These can either be specified inline or by using a nested navigation box template, although the latter method can result in a significantly large post-expand include size.

To specify child navigation boxes inline, specify either |listN=child or |listN=subgroup. Elements of the child navigation box can be specified by prepending childN_, subgroupN_, or just N_ to the parameter names (for example, 1_list1). Child navigation boxes can be nested by adding an additional prefix (for example, 1_1_list1). The basic code for doing this is as follows (which adds a subgroup for the first group/list area):

{{Navbox
|name = {{subst:PAGENAME}}
|title = Title

|group1 = 
|list1  = child
    |1_title = 

    |1_group1 = 
    |1_list1  = child
        |1_1_title = 
    
        |1_1_group1 = 
        |1_1_list1  = 
        ...list contents...
      ...
    ...
}}

To specify child navboxes using a nested template, use child as the first parameter or set the |border= parameter. The basic code for doing this is as follows (which adds a subgroup for the first group/list area):

{{Navbox
|name = {{subst:PAGENAME}}
|title = Title

|group1 = 
|list1  = {{Navbox|child
   ...child navigation box parameters...
 }}

...
}}

The following example shows two subgroups and a sub-subgroup created using the child and subgroup keywords (both are interchangeable). The striping is alternated automatically. To remove the striping altogether, you can set |childN_liststyle=background:transparent; in each.

{{Navbox
|name = {{subst:PAGENAME}}
|state = uncollapsed
|title = Multiple subgroup example
|above = Above
|below = Below
|group1 = Group1
|list1  = List1
|group2 = Group2
|list2  = child
    |child2_group1 = Group2.1
    |child2_list1  = List1
    |child2_group2 = Group2.2
    |child2_list2  = List2
    |child2_group3 = Group2.3
    |child2_list3  = List3
|group3 = Group3
|list3 = List3
|group4 = Group4
|list4 = subgroup
    |subgroup4_group1 = Group4.1
    |subgroup4_list1  = List1
    |subgroup4_group2 = Group4.2
    |subgroup4_list2  = List2
    |subgroup4_group3 = Group4.3
    |subgroup4_list3  = child
        |subgroup4_child3_group1 = Group 4.3.1
        |subgroup4_child3_list1 = List1
        |subgroup4_child3_group2 = Group 4.3.2
        |subgroup4_child3_list2 = List2
}}

Examples

Basic use

  • Wikitext:
{{Navbox
|name   = Mary Shelley quotation templates
|title  = Works by ]
|group1 = Novels
|list1  = {{temp|RQ:Mary Shelley Frankenstein}}{{·}} {{temp|RQ:Mary Shelley Last Man}}{{·}} {{temp|RQ:Mary Shelley Lodore}}{{·}} {{temp|RQ:Mary Shelley Perkin Warbeck}}{{·}}
|group2 = Short stories
|list2  = {{temp|RQ:Mary Shelley Mortal Immortal}}
}}
  • Result:

With child navigation boxes

  • Wikitext:
{{Navbox
|name   = Homer quotation templates
|title  = Works by ]
|group1 = '']''
|list1  = {{Navbox|child
    |group1 = English
    |list1  = {{temp|RQ:Homer Butler Iliad}}{{·}} {{temp|RQ:Bryant Iliad}}{{·}} {{temp|RQ:Cowper Homer}}{{·}} {{temp|RQ:Homer Dryden Iliad}}{{·}} {{temp|RQ:Homer Chapman Iliads}}{{·}} {{temp|RQ:Homer Pope Iliad}}
    |group2 = Ancient Greek
    |list2  = {{temp|RQ:grc:hom}}
    |group3 = German
    |list3  = {{temp|RQ:Voss Ilias}}
  }}
|group2 = '']''
|list2  = {{Navbox|child
    |group1 = English
    |list1  = {{temp|RQ:Cowper Homer}}{{·}} {{temp|RQ:Homer Butler Odyssey}}{{·}} {{temp|RQ:Homer Chapman Odysseys}}{{·}} {{temp|RQ:Homer Pope et al Odyssey}}
    |group2 = Ancient Greek
    |list2  = {{temp|RQ:grc:hom}}
  }}
}}
  • Result: