Template:Navbox: Difference between revisions

Jump to navigation Jump to search
Added a description for the usage and added to the Navbox and formatting templates
m (Copied the above5 to above6, cause I needed that for the Challenges NavBox... Not sure if we truly want it though)
(Added a description for the usage and added to the Navbox and formatting templates)
 
Line 1: Line 1:
<!--
<!--


Please do not edit without discussion first as this is a VERY complex template.
Please do not edit without discussion first as this is a VERY complex template.


-->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child={{#if:{{{vtabs|}}}||</div>}}|none=|#default=<table class="navbox {{{bodyclass|}}}" cellspacing="0" <!--
-->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child={{#if:{{{vtabs|}}}||</div>}}|none=|#default=<table class="navbox {{{bodyclass|}}}" cellspacing="0" <!--
Line 285: Line 288:


--><noinclude>
--><noinclude>
[[Category:Templates|Navbox]]
The Navbox is used for creating a navigation box like the template <code><nowiki>{{Level courses}}</nowiki></code>. The behind-the-scenes code for this is very complicated, and should not be edited without a discussion (also because it would impact a lot of pages).
 
== Usage ==
To use this template we start by using the following (we want to keep the styling the same across pages).
 
<code><nowiki>
{{Navbox</nowiki><br>
| name  = Level courses<br>
| state = <nowiki>{{{state|uncollapsed}}}</nowiki><br>
| liststyle  = padding: 0.25em;<br>
| titlestyle = background: #0a53e7; color: white;<br>
| abovestyle = background: #5485E7; color: white;<br>
| groupstyle = background: #85A8FF; color: white;<br>
| evenstyle  = background: #E2F1FC;<br>
| oddstyle  = background: #EFF8FE;<br>
</code>
The code above is mostly for styling purposes, so this should always be copied to each navigation box.
 
 
Below you can see the things that are allowed to be edited.
The first, <code>title</code> gives the title of the Navbox. The first part between square brackets <code>[[]]</code> is used for the link to the main page of the Navbox. The part between the <code><nowiki><font></font></nowiki></code> gives the title displayed by the system.<br>
<code>above''n''</code> displays the bar across for a subsection, for our purposes we want these things '''bold'''.<br>
<code>group''n''</code> is the name of the <code>list''n''</code>.<br>
Only <code>title</code> and <code>list''n''</code> are required.
 
<code>| title = <nowiki>[[List_of_Courses|<font color="white">Courses</font>]]</nowiki><br>
| above1 = <nowiki>'''Main Courses'''</nowiki><br>
| group1  = First Floor<br>
| list1  = <nowiki>[[Bob-omb Battlefield]] • [[Whomp's Fortress]] • [[Jolly Roger Bay]] • [[Cool, Cool Mountain]] • [[Big Boo's Haunt]]</nowiki><br>
}}</code><br>
(for now, the highest you can go with <code>above''n''</code> is <code>above6</code>.)
 
 
[[Category:Navbox templates]]
[[Category:Formatting templates]]
</noinclude>
</noinclude>
113

edits

Navigation menu