Template:navbox
Appearance
- The following documentation is located at Template:navbox/documentation. [edit]
- Useful links: subpage list • links • redirects • transclusions • errors (parser/module) • sandbox
Usage
This template generates a navigation box, chiefly to link related templates and appendices together.
Parameters
- Basic parameters
|name=– mandatory except in child navboxes: the name of the template that contains the navigation box. This is needed for the "view and edit this box" links to work properly on all pages where the template is used. You can specify|name={{subst:PAGENAME}}as a shortcut.|title=– mandatory except in child navboxes: a title which appears in the top bar of the navigation box.|cat=– A category in which to categorize all pages that include the template.
- The navigation box's content
|above=– a comment which appears across the top of the navigation box, below the title.|group1=to|group16=– a title for each list of entries. This is displayed in a header cell to the left of the entries specified using|listN=. If none of the|groupN=parameters are specified, the navbox is considered "ungrouped" and adopts a simple style with centered text (e.g.{{J. R. R. Tolkien}}).|list1=to|list16=– mandatory: the list of entries.|list1=is mandatory, others are not. Each additional list is displayed in a separate row of the navbox. Each list may be preceded by a corresponding|groupN=parameter.
- It's recommended to separate entries using the
{{middot}}template. Notice how this template is spaced:[[link one]]{{middot}} [[link two]]{{middot}} [[link three]]gives
link one · link two · link three
|continuation=– if you require more than 16 lists, specify a{{navbox|child|...}}here. See "Setting child navigation boxes" below.|below=– a comment which appears across the bottom of the navigation box.
- Formatting parameters
|1=– if{{navbox|child|...}}or{{navbox|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 or continuation area of its parent navigation box. Only use the child or subgroup option inside of another navigation box. If this parameter is omitted or set to anything else, then a regular navigation box is displayed with a 1px border. See "Setting child navigation boxes" below.
Setting child navigation boxes
It is possible to place multiple navboxes within a single border. These can be specified using a nested navigation box template.
To specify a child navbox, use child as the first 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 = Group title
|list1 = {{Navbox|child
|group1 = Subheading 1
|list1 = ...
...
}}
...
}}
Examples
Basic use
- Wikitext:
{{navbox
|name = Mary Shelley quotation templates
|title = Works by [[w:Mary Shelley|Mary Wollstonecraft Shelley]]
|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 [[w:Homer|Homer]]
|group1 = ''[[w:Iliad|The Iliad]]''
|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 = ''[[w:Odyssey|The Odyssey]]''
|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: