| Latest revision |
Your text |
| Line 1: |
Line 1: |
| {{Documentation/Header}}
| | ;Description |
| {{High Risk|pagetype=Main}} | | :This template is used to create a basic navigation box. You can do so by calling the template, via the steps under "Syntax", but it is recommended to '''copy the code verbatim''' via the steps under "Navbox Creation". |
| {{CSS}} | | ;Navbox Creation |
| This template should be used in navbox templates, which should be included at the bottom of each page that is linked in the template.
| | <inputbox> |
| | type=create |
| | prefix=Template: |
| | preload=Template:Navbox |
| | editintro=Template:Navbox/doc |
| | buttonlabel=Make your navbox! |
| | default = Navbox Foo |
| | </inputbox> |
| | #Think of a name for your navbox, like "Navbox Foo". Type it in the above field, press the button, and save the page immediately. Be ready to return to ''this'' page to see the rest of the instructions. |
| | #Edit the resulting page in source mode. |
| | #Replace <code>{{{header}}}</code> with the text you would like to appear in the header. |
| | #Replace <code>{{{body}}}</code> with the text you would like to appear in the body. |
| | #To add another section, copy these four lines of code immediately below the lines in the existing code that they resemble: |
| | <pre>|- |
| | ! style="padding:0.2em 0.5em;" nowrap="nowrap" class="color1" | {{{header}}} |
| | |- |
| | | style="padding:0.2em 0.5em;" | {{{body}}}</pre> |
|
| |
|
| ==Syntax==
| | Save the page once you have added as many sections as you needed, and filled them with content. You may also want to create a /doc subpage explaining that to call the resulting template, one must only type <code>{<nowiki/>{Navbox Foo}}</code>, or rather, whatever we decided to name the template in step 1. |
| {| class="article-table" style="width:100%;"
| |
| |-
| |
| ! Parameter(s)
| |
| ! Usage
| |
| ! style="width:9%;" | 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#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==
| | ;Syntax |
| <pre>
| |
| {{Navbox
| |
| | name = Navbox
| |
| | title = Navbox
| |
| | bodyclass = hlist
| |
|
| |
|
| | group1 = Group 1 | | <pre>{{navbox |
| | list1 = List 1 | | |header=Land of Bob |
| | |body=This <nowiki>[[place]]</nowiki> and that <nowiki>[[place]]</nowiki>. |
| | }}</pre> |
|
| |
|
| | group2 = Group 2
| | :Results in... |
| | list2 = {{Navbox|child
| |
| | evenodd=swap
| |
| | group1 = Group 2.1
| |
| | list1 = List 2.1
| |
| | group2 = Group 2.2
| |
| | list2 = List 2.2
| |
| | group3 = Group 2.3
| |
| | list3 = List 2.3
| |
| }}
| |
|
| |
|
| | group3 = Group 3 | | {{navbox |
| | list3 = | | |header=Land of Bob |
| * List 3
| | |body=This <nowiki>[[place]]</nowiki> and that <nowiki>[[place]]</nowiki>. |
| * List
| |
| * List
| |
| }} | | }} |
| </pre>
| |
| {{Navbox
| |
| | name = Navbox
| |
| | title = Navbox
| |
| | bodyclass = hlist
| |
|
| |
|
| | group1 = Group 1
| | <includeonly>[[Category:Navbox templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude> |
| | list1 = List 1
| |
| | |
| | group2 = Group 2
| |
| | list2 = {{Navbox|child
| |
| | evenodd=swap
| |
| | group1 = Group 2.1
| |
| | list1 = List 2.1
| |
| | group2 = Group 2.2
| |
| | list2 = List 2.2
| |
| | group3 = Group 2.3
| |
| | list3 = List 2.3
| |
| }}
| |
| | |
| | group3 = Group 3
| |
| | list3 =
| |
| * List 3
| |
| * List
| |
| * List
| |
| }}
| |