Template:Navbox/doc: Difference between revisions
mNo edit summary |
Standardizing parameter naming convention to snake_case |
||
| Line 12: | Line 12: | ||
|title = | |title = | ||
|striped = even | |striped = even | ||
| | |edit_link = off | ||
|group1 = | |group1 = | ||
|list1 = | |list1 = | ||
| Line 26: | Line 26: | ||
|title = Items | |title = Items | ||
|striped = even | |striped = even | ||
| | |edit_link = off | ||
|above = Some items are restricted to specific classes; see Classes for more information. | |above = Some items are restricted to specific classes; see Classes for more information. | ||
|below = Update 1.2 | |below = Update 1.2 | ||
| Line 55: | Line 55: | ||
|title = Items | |title = Items | ||
|striped = even | |striped = even | ||
| | |edit_link = off | ||
|header1 = Consumables | |header1 = Consumables | ||
| Line 106: | Line 106: | ||
}, | }, | ||
"striped": { | "striped": { | ||
"label": "Striped", | "label": "Striped", | ||
"description": "Controls if the navbox rows should have zebra striping on even or odd rows, making it easier for users to distinguish two rows apart from each other. If sections are used, each section resets the even/odd counter.", | "description": "Controls if the navbox rows should have zebra striping on even or odd rows, making it easier for users to distinguish two rows apart from each other. If sections are used, each section resets the even/odd counter.", | ||
"example": " | "example": "on, yes, striped, even, odd, swap", | ||
"type": "string", | "type": "string", | ||
"suggested": true | "suggested": true | ||
}, | }, | ||
" | "edit_link": { | ||
"label": "Edit link", | "label": "Edit link", | ||
"description": "Controls if an edit icon should be displayed at the top-left of the navbox, making it easier for users to interact with the template itself.", | "description": "Controls if an edit icon should be displayed at the top-left of the navbox, making it easier for users to interact with the template itself.", | ||
"example": "off, no", | "example": "off, no", | ||
"type": "string" | "type": "string", | ||
"default": "on" | |||
}, | }, | ||
"state": { | "state": { | ||
| Line 187: | Line 185: | ||
"title", | "title", | ||
"striped", | "striped", | ||
" | "edit_link", | ||
"state", | "state", | ||
"headern", | "headern", | ||
Latest revision as of 10:29, 4 May 2026
This is the documentation page for Navbox. It contains usage information, categories, and other content not part of the original template page. | |||
|---|---|---|---|
| Main | Documentation | Draft | Usage |
Template that creates a standard navigation box.
- For full documentation: RANGER navboxes
- For the full list of supported parameters: Template:Navbox
Syntax
[edit source]{{Navbox
|title =
|striped = even
|edit_link = off
|group1 =
|list1 =
|group2 =
|list2 =
}}
Examples
[edit source]Multiple subgroups
[edit source]
{{Navbox
|title = Items
|striped = even
|edit_link = 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
}}
Multiple expands/collapses in a single container
[edit source]
{{Navbox
|title = Items
|striped = even
|edit_link = off
|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
}}
Template Data
[edit source]Template that creates a standard navigation box.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Title | title | Text that appears at the top of the navbox. | String | suggested |
| Striped | striped | Controls if the navbox rows should have zebra striping on even or odd rows, making it easier for users to distinguish two rows apart from each other. If sections are used, each section resets the even/odd counter.
| String | suggested |
| Edit link | edit_link | Controls if an edit icon should be displayed at the top-left of the navbox, making it easier for users to interact with the template itself.
| String | optional |
| State | state collapsible | Controls if a navbox should be expanded or collapsed when the page loads. This only affects the whole navbox; if sections are used, they are treated differently.
| String | optional |
| Header n | headern header1 header2 header3 | Text that appears at the top of the section, where n is any positive integer. | String | optional |
| Group n | groupn group1 group2 group3 | Text label for a list, which appears on the left on desktop or at the top on mobile, where n is any positive integer. | String | optional |
| List n | listn list1 list2 list3 | A wikitext list, where n is any positive integer. | Content | optional |
| Group n.x | groupn.x group1.1 group1.2 group2.1.1 | Text label for sub-lists that appear under groupn, groupn.x, etc. | String | optional |
| List n.x | listn.x list1.1 list1.2 list2.1.1 | Wikitext sub-lists. | Content | optional |