Template: Navbox/doc

From Thea RP Community
Jump to: navigation, search
Info.png
Heads-up

This is a MAJOR work-in-progress; we're currently in the process of getting the styling set in the root navbox styles at Common.css. The navbox template automatically allows for that by setting a class name, but the styles are still being worked on at this time. Please be patient while we continue to work on this. Thank you!

Info.png


This is a metatemplate for building navboxes, which uses the NavboxBuilder module. 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. This code is very modular and can be used to customize a navbox for use on any article.

Copy/paste

{{Navbox
| title = Title
| 1 list = Links
}}

Parameters

Main

| editlink - sets the link for the exact template used, i.e., 'Locations' or 'Navbox' (required)
| class - sets the navbox's class for styling
| title - the title of the navbox
| links - links that appear on the left of the title bar
| state - should the navbox be collapsed or expanded by default?
| above/below - fields above and below sections and images
| n header - heading of a section
| n list - single row with a list of items/links
| n group - heading of a list
| n.m list - single row with a sub-list of items/links
| n.m group - heading of a sub-list
  • links - Wiki syntax can be used here
    • title must be used to see them
  • n & m - can be any positive number
  • class - allows you to set a class name that styles the box according to faction-specific colors, available values:
    • remschied
    • allied-nations
    • guilds - IN-PROGRESS
      • If 'class' is not defined, it will use 'default' as the parameter.

Examples

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

Title and few rows


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

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

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

Faction-themed navboxes

Remschied


{{Navbox
| editlink = Navbox
| class = remschied
| title = Remschied Infobox
| 1 group = Lorem
| 1 list = Consectetur
}}


Allied Nations


{{Navbox
| editlink = Navbox
| class = allied-nations
| title = Allied Nations Infobox
| 1 group = Lorem
| 1 list = Consectetur
}}


Above and Below


{{Navbox
| editlink = Navbox
| title = Lorem ipsum
| above = Some text
| below = Some other text
| 1 group = Dolor
| 1 list = Set
}}


Navbox No Group List

In this instance, to create a no-group list, you would just number a list without a same-numbered group, as shown below:


{{Navbox
| editlink = Navbox
| title = Lorem ipsum
| 1 list = Dolor · Set
| 2 group = GroupName
| 2 list = Li1 · Li2 · Li3
| 3 list = Dolor · Set
}}

Subgroups


{{Navbox
| editlink = 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
}}