Global Lua Modules/NavboxBuilder

NavboxBuider is a module that makes creating navboxes a breeze.

Features

 * Unlimited rows and sections.
 * Collapsible navbox and sections.
 * Possibility to customize/localize parameter names.
 * Parameter documentation can be imported from Dev Wiki and it will reflect customized parameter names

How to install
In order to use it you need to have Scribunto extension enabled on your wiki. If it isn't available for your community, just send a request via Special:Contact.

Module
First thing is the module itself. You don't need to copy the code. Just create a module titled Module:NavboxBuilder (or any other – just remember to adjust  calls) and put this in the code

You can also customize parameters and change some additional settings at this point. See their respective sections for more info.

CSS
There are two things to do here. First is importing the stylesheet that gives structure to the navbox. To do that just add this at the top of your Common.css or Wikia.css.

Second is changing how it looks. More info on that can be found in the Design section below.

Template
The module is designed to be used as a regular template. To do that just create a template (ex: Template:Navbox) with following content:

Parameters
Now the template you created will accept parameters documented below.

These parameters can also be passed directly to the  and will act as defaults. Their values will be overridden by same ones passed to the template.

Styling parameters are an exception. In their case both values will be used together.

The example above also includes the part that will insert parameter documentation on your wiki. It'll display in your wiki's language (if a translation exists) and change to reflect customized parameters.

You can change the language by specifying it in an additional parameter

Customizing parameters
When importing the module. Copy this and fill in yours

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

Note: examples below use NavboxBuilder for styling.

Additional settings
These settings require you to alter how the module is imported to:

N's and M's
If you want to change how they appear in the documentation, just change it like so: ''Note: Templates, parser functions etc won't be parsed thou. Only basic wikisyntax, like italics and html tags.''

Design
If you want to customize the look of your navbox, you have few options. One of it is by using parameters, preferably by passing them to #invoke as defaults. There are few classes that adhere to wiki's theme that are perfect for this, like,. In the default skin, you can achieve the look like this:

With as little as this in your Navbox template:

The other way is styling it in your Common.css or Wikia.css. You can find a guide to classes below.
 * Main navbox element
 * – when collapsing is enabled
 * – when it's collapsed
 * Title bar
 * – when the navbox is collapsible
 * – when the navbox is expanded
 * – when the navbox is collapsed
 * Above and below
 * and
 * Left and right images (both main and sections)
 * Section header
 * – when the section is collapsible
 * – when the section is expanded
 * – when the section is collapsed
 * Rows
 * – for odd numbered rows
 * – for even numbered rows
 * Groups
 * Subgroups
 * Lists
 * – when there's no group for this row
 * Shared classes
 * – a way to customize padding of cells. Applies to all lists, groups, subgroups and above/below fields. But not to headers and the title.
 * – a way to highlight headings. Applies to all groups, subgroups, header and above/below fields.
 * Lists
 * – when there's no group for this row
 * Shared classes
 * – a way to customize padding of cells. Applies to all lists, groups, subgroups and above/below fields. But not to headers and the title.
 * – a way to highlight headings. Applies to all groups, subgroups, header and above/below fields.
 * – a way to customize padding of cells. Applies to all lists, groups, subgroups and above/below fields. But not to headers and the title.
 * – a way to highlight headings. Applies to all groups, subgroups, header and above/below fields.

Spacing
If you want to change the size of spaces between cells, here's what you have to change: