Editing Module:NavboxGenerator/doc

Warning: You are not logged in. Once you make an edit, a temporary account will be created for you. Learn more. Log in or create an account to continue receiving notifications after this account expires, and to access other features.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
Not finished.
Not finished.


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


=Parameters=
==Example==
Within each level of the json:
* '''<key>''' - Title to display in the div/container/box. Can wrap it in <code><nowiki><span style="mystyle">key</span></nowiki></code> 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=
For understanding the input syntax, it is recommended to view the Simple Example first.
 
==Simple Example==
The input can be seen at [[Data:ItemNavboxSample.json]]
 
<code><nowiki>{{#invoke:NavboxGenerator|createNavbox|Data:ItemNavboxSample.json}}</nowiki></code>
 
Outputs
 
{{#invoke:NavboxGenerator|createNavbox|Data:ItemNavboxSample.json}}
 
==Styled Example==
The input can be seen at [[Data:ItemNavbox.json]]
The input can be seen at [[Data:ItemNavbox.json]]


Line 33: Line 14:




=Needed changes=
==Needed changes==
1. Style/Formatting made prettier
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.
2. A way to have the json iterated in order; for some reason mw.loadJsonData doesn't load the keys in order they appear.
Please note that all contributions to The Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see Deadlock:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template

Page included on this page: