Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Navbox/doc: Difference between revisions

Template page
Eleiyas (talk | contribs)
Created page with "{{Documentation/Header}} {{CSS|Navbox|Colors}} Base template for all Navboxes. ==Syntax== {|class="article-table" style="width:100%;" |- !Parameter(s) !Usage !style="width:10%;" | Default value(s) |- |{{{name}}} |Should be identical to the template's name without namespace. |{{{name}}} |- |{{{title}}} |Sets the title used at the top of the navbox. |{{{title}}} |- |{{{state}}} |Allows you to change the collapsing state of the table. mw:Manual:Collapsible elements#Commo..."
 
Updated to RANGER navbox
Line 1: Line 1:
{{Documentation/Header}}
{{Documentation/Header}}
{{CSS|Navbox|Colors}}
{{Lua|Navbox}}
Base template for all Navboxes.
{{CSS|Navbox}}
Template that creates a standard navigation box.
 
For full documentation: [https://support.wiki.gg/wiki/RANGER_navboxes RANGER navboxes]


==Syntax==
==Syntax==
{|class="article-table" style="width:100%;"
<pre>
|-
{{Navbox
!Parameter(s)
|title =
!Usage
|striped = even
!style="width:10%;" | Default value(s)
|editlinks = off
|-
|group1 =
|{{{name}}}
|list1 =
|Should be identical to the template's name without namespace.
|group2 =  
|{{{name}}}
|list2 =
|-
}}
|{{{title}}}
</pre>
|Sets the title used at the top of the navbox.
|{{{title}}}
|-
|{{{state}}}
|Allows you to change the collapsing state of the table. [[mw:Manual:Collapsible elements#Common.js script (Before 1.18)|More info]]. Collapsed is removed while on pages in the Template namespace, to make editing easier.
|collapsible
|-
|{{{titleclass}}}
|Set the css class used for the title area.
|''None''
|-
|{{{titlestyle}}}
|Allows custom styling for the title area.
|''None''
|-
|{{{bodyclass}}}
|Set the css class used for the body area.
|''None''
|-
|{{{bodystyle}}}
|Allows custom styling for the body area.
|''None''
|-
|{{{groupclass}}}
|Set the css class used for the group area.
|''None''
|-
|{{{groupstyle}}}
|Allows custom styling for the group area.
|''None''
|-
|{{{listclass}}}
|Set the css class used for the list area.
|''None''
|-
|{{{liststyle}}}
|Allows custom styling for the list area.
|''None''
|-
|{{{evenodd}}}
|Can be set to "swap" to reverse the order of styling among lists (starts with even by default).
|''None''
|-
|{{{1}}}
|Can be set to "child" or "subgroup" to use styling intended for nested navboxes.
|''None''
|-
|{{{group1-20}}}
|Adds the heading for the group number specified.
|{{{group1}}} = {{{group1}}}<br />{{{group2-20}}} = ''None''
|-
|{{{list1-20}}}
|Adds text for the list number specified.
|{{{list1}}} = {{{list1}}}<br />{{{list2-20}}} = ''None''
|}


==Sample output==
==Examples==
====Multiple subgroups====
<pre>
<pre>
{{Navbox
{{Navbox
|name      = Navbox
|title = Items
|title     = Navbox
|striped = even
|bodyclass = hlist
|editlinks = off
|above = Some items are restricted to specific classes; see Classes for more information.
|below = Update 1.2
|below_class = align-right
 
|group1 = Consumables
|list1 =
* Health Potion
* Mana Potion
 
|group2 = Weapons
|group2.1 = Swords
|list2.1 =
* Wooden Sword
* Rusted Sword
* Steel Sword
|group2.2 = Bows
|list2.2 =
* Shortbow
* Crossbow
* Longbow
}}
</pre>
 
{{Navbox
|title = Items
|striped = even
|editlinks = off
|above = Some items are restricted to specific classes; see Classes for more information.
|below = Update 1.2
|below_class = align-right


|group1   = Group 1
|group1 = Consumables
|list1     = List 1
|list1 =
* Health Potion
* Mana Potion


|group2   = Group 2
|group2 = Weapons
|list2    =  
|group2.1 = Swords
  {{Navbox|child
|list2.1 =
  |evenodd = swap
* Wooden Sword
  |group1  = Group 2.1
* Rusted Sword
  |list1  = List 2.1
* Steel Sword
  |group2 = Group 2.2
|group2.2 = Bows
  |list2   = List 2.2
|list2.2 =
  |group3  = Group 2.3
* Shortbow
  |list3  = List 2.3
* Crossbow
  }}
* Longbow
}}


|group3   = Group 3
====Multiple expands/collapses in a single container====
|list3     =
<pre>
* List 3
{{Navbox
* List
|title = Items
* List
|striped = even
 
|header1 = Consumables
|header1.1 = Potions
|list1.1 =
* Revitalizing Potion
* Teleport Potion
|group1.1.1 = Health
|list1.1.1 =
* Health Potion
* Large Health Potion
* Elixir of Healing
|group1.1.2 = Mana
|list1.1.2 =
* Mana Potion
* Large Mana Potion
* Elixir of Magic
|header1.2 = Scrolls
|list1.2 =
* Scroll of Poison
 
|header3 = Weapons
|state3 = collapsed
|group3 = Swords
|list3 =
* Wooden Sword
* Rusted Sword
* Steel Sword
|group4 = Bows
|list4 =
* Shortbow
* Crossbow
* Longbow
|group5 = Staves
|list5 =
* Basic Staff
* Wizard's Staff
}}
}}
</pre>
</pre>
{{Navbox
{{Navbox
|name      = Navbox
|title = Items
|title     = Navbox
|striped = even
|bodyclass = hlist
 
|group1    = Group 1
|list1    = List 1


|group2    = Group 2
|header1 = Consumables
|list2    =  
|header1.1 = Potions
  {{Navbox|child
|list1.1 =
  |evenodd = swap
* Revitalizing Potion
  |group1 = Group 2.1
* Teleport Potion
  |list1   = List 2.1
|group1.1.1 = Health
  |group2  = Group 2.2
|list1.1.1 =
  |list2  = List 2.2
* Health Potion
  |group3  = Group 2.3
* Large Health Potion
  |list3  = List 2.3
* Elixir of Healing
  }}
|group1.1.2 = Mana
|list1.1.2 =
* Mana Potion
* Large Mana Potion
* Elixir of Magic
|header1.2 = Scrolls
|list1.2 =
* Scroll of Poison


|group3   = Group 3
|header3 = Weapons
|list3     =
|state3 = collapsed
* List 3
|group3 = Swords
* List
|list3 =
* List
* Wooden Sword
* Rusted Sword
* Steel Sword
|group4 = Bows
|list4 =
* Shortbow
* Crossbow
* Longbow
|group5 = Staves
|list5 =
* Basic Staff
* Wizard's Staff
}}
}}