This is the documentation page for Module:NavboxGenerator

Not finished.

Overview edit

Create's a navbox from a json file for input where keys are a title div container, and value "Display" is the display text. Each title div container gets smaller and smaller the further it is in the json.

Parameters edit

Within each level of the json:

  • <key> - Title to display in the div/container/box. Can wrap it in <span style="mystyle">key</span> for styling it.
  • Style - Style for the div
  • Display - Text to display below the div
  • <Any other value> - Recursively calls for the contained layer, with <Any other value> as the new <key>

Examples edit

For understanding the input syntax, it is recommended to view the Simple Example first.

Simple Example edit

The input can be seen at Data:ItemNavboxSample.json

{{#invoke:NavboxGenerator|createNavbox|Data:ItemNavboxSample.json}}

Outputs

Items
Vitality
500
1250
 1,250
 
Bullet Armor
 1,250
 
Combat Barrier
 1,250
 
Debuff Reducer
 1,250
 
ACTIVE
Divine Barrier
 1,250
 
Healbane
 1,750
 
ACTIVE

 

Healing Nova
 1,250
 
ACTIVE
Restorative Locket
 1,250
 
ACTIVE
Return Fire
 1,250
 
Spirit Armor
Weapon
500
1250
 1,250
 
Active Reload
 1,250
 
Berserker
 1,250
 
ACTIVE
Fleetfoot
 1,250
 
Kinetic Dash
 1,250
 
Long Range
 1,250
 
Melee Charge
 1,250
 
Mystic Shot
 1,250
 
Swift Striker

Styled Example edit

The input can be seen at Data:ItemNavbox.json

{{#invoke:NavboxGenerator|createNavbox|Data:ItemNavbox.json}}

Outputs

 1250
 1,250
 
Bullet Armor
 1,250
 
Combat Barrier
 1,250
 
Debuff Reducer
 1,250
 
ACTIVE
Divine Barrier
 1,250
 
Healbane
 1,750
 
ACTIVE

 

Healing Nova
 1,250
 
ACTIVE
Restorative Locket
 1,250
 
ACTIVE
Return Fire
 1,250
 
Spirit Armor
 500
 1250
 1,250
 
Active Reload
 1,250
 
Berserker
 1,250
 
ACTIVE
Fleetfoot
 1,250
 
Kinetic Dash
 1,250
 
Long Range
 1,250
 
Melee Charge
 1,250
 
Mystic Shot
 1,250
 
Swift Striker
 500


Needed changes edit

1. Style/Formatting made prettier 2. A way to have the json iterated in order; for some reason mw.loadJsonData doesn't load the keys in order they appear.


This is not used on any pages currently.