FANDOM


This is a metatemplate for building navboxes, which uses the NavboxBuilder module on dev wiki. A navbox is a grouping of links used in multiple related articles to facilitate navigation between those pages.

An infinite amount of rows and sections are supported, as well as making groups collapsible. Each of these options can be specified for individual sections or the whole navbox. The template also supports displaying images to the left and/or right of individual sections or the whole navbox.

Usage

{{Navbox}} is a metatemplate, meaning it is a template for other templates. So, a navbox, {{navbox FFVI}}, will be built using "Navbox" as its base code, and once created, a user only needs to add {{navbox FFVI}} to the bottom of an article for it to be put in place. This code is primarily for building other navboxes, not for being used on articles.

Copy/paste

{{Navbox
| editlink = {{Tnav|Navbox example}}
| title = Title
| 1 list = Links
}}

Parameters

Below is the list of all available parameters. At least one list is required for the navbox to show up. Apart from that, all other parameters are optional.

Main

  • title – main title of the navbox.
  • links – links that appear on left side of the title bar.
    • You can put any wikisyntax here.
    • title is required for it to work.
  • state – should the navbox be collapsed or expanded by default
    • Values: collapsed or expanded (case insensitive)
    • Empty or unrecognized values will disable collapsing.
    • title is required for it to work
  • above and below – fields above and below sections and images.
  • left image and right image – fields beside sections, most commonly used to add images.
    • You can put any content here, not only images.

Sections

Sections include all lists with the same or higher number up to the next section.

  • n header – heading of a section
    • n – any positive integer
    • Requires at least one list to be included to show up
  • n state – should the section be collapsed or expanded by default
    • n – number of an existing header
    • Values: collapsed or expanded (case insensitive)
    • Empty or unrecognized values will disable collapsing.
  • header state – same as above, but affects all headers
    • Values: collapsed or expanded (case insensitive)
    • Empty or unrecognized values will disable collapsing.
    • Can be overridden by n state
  • n layout – selects layout for that section
    • n – any positive integer
    • Can be used without n header to create a separate section without a header
    • Values: table or horizontal (case insensitive)
    • Empty or unrecognized values will use default (table).

Table layout (table)

Standard layout with lists and sublists.

  • n left image and n right image – fields beside sections lists in that section, most commonly used to add images.
    • n – number of an existing header
    • You can put any content here, not only images.

Horizontal layout (horizontal)

Horizontal layout with lists forming columns. Sublists are not supported and will be treated as regular lists.

  • n per row – maximum number of lists per row.
    • n – number of an existing section.
    • Value: any number above 1.
    • Number of columns is still limited by space needed. You can't go higher than flexbox allows.
  • n span – how many columns should the list span.
    • n – number of an existing list.
    • Value: any number between 0 and corresponding n per row

Lists

  • n list – single row with a list of links
    • n – any positive integer
  • n group – heading of a list
    • n – number of an existing list or sublist

Sublists will appear as sub entries of the group with same n.

  • n.m list – single row with a list of links
    • n and m – any positive integers
  • n.m group – heading of a sublist
    • n and m – numbers of an existing sublist

Styling

  • class and style – applied to the main navbox element
  • title class and title style – applied to the title bar
  • base class and base style – applied to all groups, subgroups, headers, above and below fields
  • above class and above style – applied to the above field
  • below class and below style – applied to the below field
  • image class and image style – applied to all image fields
  • left image class and left image style – applied to the main left image field
  • right image class and right image style – applied to the main right image field
  • header class and header style – applied to all headers
  • n header class and n header style – applied to the header specified with n
  • n left image class and n left image style – applied to the left image field in the section specified with n
  • n right image class and n right image style – applied to the right image field in the section specified with n
  • group class and group style – applied to all groups
  • subgroup class and subgroup style – applied to all subgroups
  • n group class and n group style – applied to the group specified with n
  • n.m group class and n.m group style – applied to the subgroup specified with n and m
  • list class and list style – applied to all lists
  • n list class and n list style – applied to the list specified with n
  • n.m list class and n.m list style – applied to the list specified with n and m

Examples

Here are few example to show what the module is capable of and how to achieve that.

Title and few rows

{{Navbox
| title = Lorem ipsum
| editlink = Navbox

| 1 group = Dolor
| 1 list = Consectetur · adipiscing · elit

| 2 group = Sit
| 2 list = Sed · commodo · quam · sed · orci · varius · bibendum
}}

Using Codename class

{{Navbox
| title = Lorem ipsum
| editlink = Navbox
| class = FFVI

| 1 group = Dolor
| 1 list = Consectetur · adipiscing · elit

| 2 group = Sit
| 2 list = Sed · commodo · quam · sed · orci · varius · bibendum
}}

Above and below

{{Navbox
...
| Above = In pellentesque sapien justo
| Below = Vel accumsan justo pulvinar non
...
}}

Sections

{{Navbox
| title = Lorem ipsum
| editlink = Navbox

| 1 group = Dolor
| 1 list = Consectetur · adipiscing · elit

| 2 header = Mauris scelerisque
| 2 group = Sit
| 2 list = Sed · commodo · quam · sed · orci · varius · bibendum

| 10 header = Duis ornare aliquet
| 11 group = Curabitur sem ex
| 11 list = faucibus · eu maximus · sit · amet

| 12 group = Vestibulum
| 12 list = Cras · laoreet · ex · at · efficitur · auctor
}}

Collapsible sections

{{Navbox
| title = Lorem ipsum
| editlink = Navbox

| 1 header = Mauris scelerisque
| 1 state = expanded
| 1 group = Sit
| 1 list = Sed · commodo · quam · sed · orci · varius · bibendum

| 2 header = Duis ornare aliquet
| 2 state = collapsed
| 2 group = Curabitur sem ex
| 2 list = faucibus · eu maximus · sit · amet

| 3 group = Vestibulum
| 3 list = Cras · laoreet · ex · at · efficitur · auctor
}}

Subgroups

{{Navbox
| title = Lorem ipsum
| editlink = Navbox

| 1 group = Dolor
| 1.1 group = Sit
| 1.1 list = Consectetur · adipiscing · elit
| 1.2 group = Amet
| 1.2 list = Sed · commodo · quam · sed · orci · varius · bibendum

| 2 group = Quisque
| 2.1 list = Mauris · facilisis · condimentum · pretium
| 2.2 list = Proin · dictum · dui · felis
}}

Styling

{{Navbox
...
| title class = neutral
| group style = color: red;
| list style = color: blue;
| 12 list style = color: green;
}}

Right navbox

{{Navbox
| title = Lorem ipsum
| editlink = Navbox

| class = right
| style = width: 35em;

| 1 list class = 3-columns
| 1 list = *Consectetur
*adipiscing
*elit
}}

Examples in use

Examples of navboxes actually in use are as follows:

{{navbox FFVI}}
Uses bg image, class, and headers
{{navbox armor}}
Uses columns, headers
{{navbox black magic}}
Uses multiple different classes, headers, and blocks
{{navbox translations}}
Uses positioning (as a sidenav)

Background images

The navboxes which use a background image (referred to as "bg" image) import the images from Common.css, which are hosted on the FF wiki. The images are all 170x30 in resolution. Anyone can upload an image for the navboxes.

The background images should only be featured on navboxes for the game in question. They are triggered by the "editlink" param (see above). Since the navbox name will be identical to the game's class and code name, the editlink should be too, meaning it will activate the js and css.

The images can be found in Category:Navbox Images.

When a background image is used, the titletext replaces normal text.

Community content is available under CC-BY-SA unless otherwise noted.