Template:Navbox/doc: Difference between revisions

mNo edit summary
Updated
Line 1: Line 1:
{{Documentation/Header}}
{{Documentation/Header}}
{{Lua|Navbox}}
{{Lua|Navbox}}
{{CSS|Navbox}}
{{CSS|Gadget-Navbox}}
Template that creates a standard navigation box.  
Template that creates a standard navigation box.  


For full documentation: [https://support.wiki.gg/wiki/RANGER_navboxes RANGER navboxes]
* For full documentation: [https://support.wiki.gg/wiki/RANGER_navboxes RANGER navboxes]
* For the full list of supported parameters: [https://support.wiki.gg/wiki/RANGER_navboxes Template:Navbox]


==Syntax==
==Syntax==
<pre>
<syntaxhighlight lang="wikitext" copy>
{{Navbox
{{Navbox
|title =  
|title =  
Line 17: Line 18:
|list2 =  
|list2 =  
}}
}}
</pre>
</syntaxhighlight>


==Examples==
==Examples==
====Multiple subgroups====
===Multiple subgroups===
<pre>
{{Example|<nowiki>
{{Navbox
{{Navbox
|title = Items
|title = Items
Line 47: Line 48:
* Longbow
* Longbow
}}
}}
</pre>
</nowiki>}}


{{Navbox
===Multiple expands/collapses in a single container===
|title = Items
{{Example|<nowiki>
|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 = 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====
<pre>
{{Navbox
{{Navbox
|title = Items
|title = Items
Line 118: Line 93:
* Wizard's Staff
* Wizard's Staff
}}
}}
</pre>
</nowiki>}}


{{Navbox
==Template Data==
|title = Items
<templatedata>
|striped = even
{
|editlinks = off
"params": {
 
"title": {
|header1 = Consumables
"label": "Title",
|header1.1 = Potions
"description": "Text that appears at the top of the navbox.",
|list1.1 =
"type": "string",
* Revitalizing Potion
"suggested": true
* Teleport Potion
},
|group1.1.1 = Health
"striped": {
|list1.1.1 =
"aliases": [
* Health Potion
"evenodd"
* Large Health Potion
],
* Elixir of Healing
"label": "Striped",
|group1.1.2 = Mana
"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.",
|list1.1.2 =
"example": "y, yes, on, striped, event, swap, odd",
* Mana Potion
"type": "string",
* Large Mana Potion
"suggested": true
* Elixir of Magic
},
|header1.2 = Scrolls
"editlinks": {
|list1.2 =
"label": "Edit Link",
* Scroll of Poison
"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",
|header3 = Weapons
"type": "string"
|state3 = collapsed
},
|group3 = Swords
"state": {
|list3 =
"aliases": [
* Wooden Sword
"collapsible"
* Rusted Sword
],
* Steel Sword
"label": "State",
|group4 = Bows
"description": "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.",
|list4 =
"example": "expanded, collapsed, off, no, plain",
* Shortbow
"type": "string",
* Crossbow
"default": "expanded"
* Longbow
},
|group5 = Staves
"headern": {
|list5 =
"aliases": [
* Basic Staff
"header1",
* Wizard's Staff
"header2",
}}
"header3"
],
"label": "Header n",
"description": "Text that appears at the top of the section, where n is any positive integer.",
"type": "unbalanced-wikitext"
},
"groupn": {
"aliases": [
"group1",
"group2",
"group3"
],
"label": "Group n",
"description": "Text label for a list, which appears on the left on desktop or at the top on mobile, where n is any positive integer.",
"type": "unbalanced-wikitext"
},
"listn": {
"aliases": [
"list1",
"list2",
"list3"
],
"label": "List n",
"description": "A wikitext list, where n is any positive integer.",
"type": "unbalanced-wikitext"
},
"groupn.x": {
"aliases": [
"group1.1",
"group1.2",
"group2.1.1"
],
"label": "Group n.x",
"description": "Text label for sub-lists that appear under groupn, groupn.x, etc.",
"type": "unbalanced-wikitext"
},
"listn.x": {
"aliases": [
"list1.1",
"list1.2",
"list2.1.1"
],
"label": "List n.x",
"description": "Wikitext sub-lists.",
"type": "unbalanced-wikitext"
}
},
"description": "Template that creates a standard navigation box.",
"format": "block",
"paramOrder": [
"title",
"striped",
"editlinks",
"state",
"headern",
"groupn",
"listn",
"groupn.x",
"listn.x"
]
}
</templatedata>