Module:Navbox/doc

From Fanon Wiki
< Module:Navbox
Revision as of 17:54, 10 June 2022 by PinkYoshiFan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:Navbox

This module allows to generate a navbox in an easier way, with automatic items, or links, and/or colors.

This module is not intended to be invoked if it's not a template

Basic example

{{#invoke:Navbox|MODE|bg=BGCOLOR|expand=COLLAPSE|text=TEXTCOLOR|TITLE|
Head // Item; Item; Item; Item
Head // Item; Item; Item
Head // Item; Item; Item; Item
Head // Item; Item; Item
...
}}

To set each item, break a line after the invocation and start with the title of the row, which is represented on the example above as Head. This is the "header" of each row in the table. Then split it with a forward slash and add your item, then split each item with a semicolon.

Remember that each section needs to be in the same row! If you break a line it will start a new section.

  • MANDATORY: MODE — sets the mode of the navbox. The available ones are:
    • list: adds an item normally, but without links automatically. To set a link to each page you need to add MediaWiki's [[syntax]] manually. This is recommended for most cases.
    • autolink: each item will be turn into a link automatically, so Item will have a link to the page called "Item". This is good for some situations, but it can have some limitations.
  • MANDATORY: TITLE — sets the title of the navbox. OBS: even if the mode is set to autolink, the navbox needs a manually-placed link.
  • Optional: bg=BGCOLOR — sets the background and border color of the navbox. Replace BGCOLOR with a hex, hsv, hsl, rgb, or rgba value.
  • Optional: text=TEXTCOLOR — sets the text color of the title and "headers". Black by default. If changed, it's recommended to be white (#ffffff) in 99.9% of cases.
  • Optional: expand=COLLAPSE — makes the navbox collapsed by default. It can be any given value, however, use the word "Collapsed" to be more clear.

Demo

{{#invoke:Navbox|list|bg=#0ae744|text=#000|My Title|
Asia // Japan; China; Korea; India; Indonesia; Iran
Africa // Egypt; Tanzania; Morocco; Gabon
South America // Argentina; Colombia; Brazil
North America // Canada; United States; Jamaica; Mexico
Europe // Austria
Moon // Mario; Knuckles
}}