Jump to content

Editing Template:Navbox/doc

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
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:
{{Documentation/Header}}
{{Documentation/Header}}
{{Lua|Navbox}}
{{Lua|Navbox}}
{{CSS|Gadget-Navbox}}
{{CSS|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==
<syntaxhighlight lang="wikitext" copy>
<pre>
{{Navbox
{{Navbox
|title =  
|title =  
|striped = even
|striped = even
|edit_link = off
|editlinks = off
|group1 =  
|group1 =  
|list1 =  
|list1 =  
Line 18: Line 17:
|list2 =  
|list2 =  
}}
}}
</syntaxhighlight>
</pre>


==Examples==
==Examples==
===Multiple subgroups===
====Multiple subgroups====
{{Example|<nowiki>
<pre>
{{Navbox
{{Navbox
|title = Items
|title = Items
|striped = even
|striped = even
|edit_link = off
|editlinks = 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 48: Line 47:
* Longbow
* Longbow
}}
}}
</nowiki>}}
</pre>


===Multiple expands/collapses in a single container===
{{Example|<nowiki>
{{Navbox
{{Navbox
|title = Items
|title = Items
|striped = even
|striped = even
|edit_link = off
|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
|title = Items
|striped = even


|header1 = Consumables
|header1 = Consumables
Line 93: Line 117:
* Wizard's Staff
* Wizard's Staff
}}
}}
</nowiki>}}
</pre>
 
{{Navbox
|title = Items
|striped = even


==Template Data==
|header1 = Consumables
<templatedata>
|header1.1 = Potions
{
|list1.1 =
"params": {
* Revitalizing Potion
"title": {
* Teleport Potion
"label": "Title",
|group1.1.1 = Health
"description": "Text that appears at the top of the navbox.",
|list1.1.1 =
"type": "string",
* Health Potion
"suggested": true
* Large Health Potion
},
* Elixir of Healing
"striped": {
|group1.1.2 = Mana
"label": "Striped",
|list1.1.2 =
"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.",
* Mana Potion
"example": "on, yes, striped, even, odd, swap",
* Large Mana Potion
"type": "string",
* Elixir of Magic
"suggested": true
|header1.2 = Scrolls
},
|list1.2 =
"edit_link": {
* Scroll of Poison
"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.",
|header3 = Weapons
"example": "off, no",
|state3 = collapsed
"type": "string",
|group3 = Swords
"default": "on"
|list3 =
},
* Wooden Sword
"state": {
* Rusted Sword
"aliases": [
* Steel Sword
"collapsible"
|group4 = Bows
],
|list4 =
"label": "State",
* Shortbow
"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.",
* Crossbow
"example": "expanded, collapsed, off, no, plain",
* Longbow
"type": "string",
|group5 = Staves
"default": "expanded"
|list5 =
},
* Basic Staff
"headern": {
* Wizard's Staff
"aliases": [
}}
"header1",
"header2",
"header3"
],
"label": "Header n",
"description": "Text that appears at the top of the section, where n is any positive integer.",
"type": "string"
},
"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": "string"
},
"listn": {
"aliases": [
"list1",
"list2",
"list3"
],
"label": "List n",
"description": "A wikitext list, where n is any positive integer.",
"type": "content"
},
"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": "string"
},
"listn.x": {
"aliases": [
"list1.1",
"list1.2",
"list2.1.1"
],
"label": "List n.x",
"description": "Wikitext sub-lists.",
"type": "content"
}
},
"description": "Template that creates a standard navigation box.",
"format": "block",
"paramOrder": [
"title",
"striped",
"edit_link",
"state",
"headern",
"groupn",
"listn",
"groupn.x",
"listn.x"
]
}
</templatedata>
Please note that all contributions to The Petit Planet Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see Petit Planet Wiki: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
Below are commonly used wikitext from MediaWiki:Edittools. Click on any to insert them in the edit box.
File Pages==Summary====Licensing=={{Fairuse}}{{File|}}
Dynamic Page List¦²«»²{¦}²«»«/»«!----»
Array in DPL¹^2{}^2^2{¹}^2
Parser Functions{{#if:||}}
{{#ifeq:|||}}
{{#expr:}}
{{#switch:||#default=}}
{{#replace:||}}
{{#titleparts:}}
{{#tag:|}}
Markup{{}}|[][[]][[Category:]]#REDIRECT [[]] [[Category:Redirect Pages]]<code></code><includeonly></includeonly><noinclude></noinclude><nowiki></nowiki><!----><br>§
Notices{{Stub|}}{{Stub Dialogue}}{{Upcoming}}{{Under Construction}}{{Placeholder|}}
Magic Words{{!}}{{formatnum:}}{{lc:}}{{uc:}}{{PAGENAME}}{{FULLPAGENAME}}{{ROOTPAGENAME}}{{BASEPAGENAME}}{{SUBPAGENAME}}{{DISPLAYTITLE:|noreplace}}__TOC____NOTOC____EXPECTUNUSEDCATEGORY____HIDDENCAT__
HTML Entities&mdash;&nbsp;&comma;&shy;