Difference between revisions of "Template:Navbox"

From Wiki - Scioly.org
Jump to: navigation, search
(Added 2nd example, adding subgroups)
(Removing CSS in wikitext)
 
(19 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude>
+
<includeonly>{{#invoke:Navbox|navbox}}</includeonly><noinclude>
{{TemplateDocStart}}
+
{{Documentation}}
::''Parts of this page were taken from the [https://en.wikipedia.org/wiki/Template:Navbox/doc The English Wikipedia's documentation on the Navbox template].
 
 
 
This navigational template creates a box with a long list of organized links, so that a user can move between similar pages quickly. The template has default CSS styling, which can be changed as needed, although this is not recommended. This template should be used in a variety of places throughout the wiki because of its ease of use and standardization.
 
 
 
== Parameters ==
 
: <code>name</code> – The name of the Navbox
 
: <code>title</code> – The title of the Navbox (shown at the top)
 
: <code>titlestyle</code> – A CSS style for the title-bar, such as: <code>background: aqua;</code>
 
: <code>groupstyle</code> – A CSS style for the group-cells, such as: <code>background: #f516db;</code>
 
: <code>above</code> – Text to appear above the group/list section
 
: <code>image</code> – An optional right-side image, coded as the whole image. Typically it is purely decorative, so it should be coded as <code><nowiki>[[File:</nowiki><var>XX</var><nowiki>.jpg|80px|link=|alt=]]</nowiki></code>.
 
: <code>imageleft</code> – An optional left-side image (code the same as the "image" parameter).
 
: <code>group<sub>n</sub></code> – The left-side text before list-n (if group-n omitted, list-n extends to the left edge of the box, and defaults to <code>text-align:center</code> styling).
 
: <code>list<sub>n</sub></code> – Text listing wikilinks using a <code>hlist</code> format (where the wikilinks are styled as a horizontal list).
 
: <code>below</code> – Optional text to appear below the group/list section.
 
 
 
== Examples ==
 
=== A Simple Navbox Showing Layout ===
 
<pre>
 
<nowiki>
 
{{Navbox
 
| name  = Navbox/doc
 
| title = Title
 
| above = Above
 
 
 
| image = [[File:StateMembership2019.jpeg | 200px]]
 
 
 
| group1 = Group1
 
| list1  = List1
 
 
 
| group2 = Group2
 
| list2  =
 
* List 1
 
* List 2
 
 
 
| group3 = Group3
 
| list3  =
 
* List 1
 
* List 2
 
* List 3
 
 
 
| group4 = Group4
 
| list4  =
 
* List 1
 
* List 2
 
* List 3
 
* List 4
 
 
 
| group5 = Group5
 
| list5  =
 
* List 1
 
* List 2
 
* List 3
 
* List 4
 
* List 5
 
 
 
| below = Below
 
 
 
}}
 
</nowiki>
 
</pre>
 
 
 
{{Navbox
 
| name  = Navbox/doc
 
| title = Title
 
| above = Above
 
 
 
| image = [[File:StateMembership2019.jpeg | 200px]]
 
 
 
| group1 = Group1
 
| list1  = List1
 
 
 
| group2 = Group2
 
| list2  = * List 1 * List 2
 
 
 
| group3 = Group3
 
| list3  = * List 1 * List 2 * List 3
 
 
 
| group4 = Group4
 
| list4  = * List 1 * List 2 * List 3 * List 4
 
 
 
| group5 = Group5
 
| list5  = * List 1 * List 2 * List 3 * List 4 * List 5
 
 
 
| below = Below
 
}}
 
 
 
== Adding Subgroups ==
 
<pre>
 
{{Navbox
 
| name  = Navbox/doc
 
| title = Title
 
| above = Above
 
 
 
| image = [[File:StateMembership2019.jpeg | 200px]]
 
 
 
| group1 = Group1
 
| list1  = List1
 
 
 
| group2 = Group2
 
| list2  = * List 1 * List 2
 
 
 
| group3 = Group3
 
| list3  = * List 1 * List 2 * List 3
 
 
 
| group4 = Group4
 
| list4  = * List 1 * List 2 * List 3 * List 4
 
 
 
| group5 = Group5
 
| list5  = {{Navbox|child
 
| group1 = ChildGroup1
 
| list1 = ChildList1
 
 
 
| group2 = ChildGroup2
 
| list2 = ChildList2
 
 
 
| below = Below
 
}}
 
</pre>
 
 
 
{{Navbox
 
| name  = Navbox/doc
 
| title = Title
 
| above = Above
 
 
 
| image = [[File:StateMembership2019.jpeg | 200px]]
 
 
 
| group1 = Group1
 
| list1  = List1
 
 
 
| group2 = Group2
 
| list2  = * List 1 * List 2
 
 
 
| group3 = Group3
 
| list3  = * List 1 * List 2 * List 3
 
 
 
| group4 = Group4
 
| list4  = * List 1 * List 2 * List 3 * List 4
 
 
 
| group5 = Group5
 
| list5  = {{Navbox|child
 
| group1 = ChildGroup1
 
| list1 = ChildList1
 
 
 
| group2 = ChildGroup2
 
| list2 = ChildList2
 
}}
 
 
 
| below = Below
 
}}
 
 
 
</noinclude>
 
 
 
{{#css:
 
        table.navbox {
 
        border: 1px solid #aaa;
 
        width: 100%;
 
        margin: auto;
 
        clear: both;
 
        font-size: 88%;
 
        text-align: center;
 
        padding: 1px;
 
    }
 
 
 
    table.navbox+table.navbox {
 
        margin-top: -1px;
 
    }
 
 
 
    .navbox-title,
 
    .navbox-abovebelow,
 
    table.navbox th {
 
        text-align: center;
 
        padding-left: 1em;
 
        padding-right: 1em;
 
    }
 
 
 
    .navbox-group {
 
        white-space: nowrap;
 
        text-align: right;
 
        font-weight: bold;
 
        padding-left: 1em;
 
        padding-right: 1em;
 
    }
 
 
 
    .navbox,
 
    .navbox-subgroup {
 
        background: #fdfdfd;
 
    }
 
 
 
    .navbox-list {
 
        border-color: #fdfdfd;
 
    }
 
 
 
    .navbox-title,
 
    table.navbox th {
 
        background: #ccccff;
 
    }
 
 
 
    .navbox-abovebelow,
 
    .navbox-group,
 
    .navbox-subgroup .navbox-title {
 
        background: #ddddff;
 
    }
 
 
 
    .navbox-subgroup .navbox-group,
 
    .navbox-subgroup .navbox-abovebelow {
 
        background: #e6e6ff;
 
    }
 
 
 
    .navbox-even {
 
        background: #f7f7f7;
 
    }
 
 
 
    .navbox-odd {
 
        background: transparent;
 
    }
 
 
 
    .navbar.mini {
 
        font-variant: small-caps;
 
    }
 
 
 
    .navbox-title p {
 
        margin: 0em 0em;
 
    }
 
 
 
    .collapseButton {
 
        float: right;
 
        font-weight: normal;
 
        text-align: right;
 
        width: auto;
 
    }
 
 
 
    .navbox .collapseButton {
 
        width: 6em;
 
    }
 
 
 
    #bodyContent .plainlinks a {
 
        background: none !important;
 
        padding: 0 !important;
 
}
 
 
 
    .hlist dl, .hlist ol, .hlist ul {
 
        margin: 0;
 
        padding: 0;
 
    }
 
 
 
    .hlist dd,
 
    .hlist dt,
 
    .hlist li {
 
        margin: 0;
 
        display: inline;
 
    }
 
    .hlist.inline,
 
    .hlist.inline dl,
 
    .hlist.inline ol,
 
    .hlist.inline ul,
 
    .hlist dl dl, .hlist dl ol, .hlist dl ul,
 
    .hlist ol dl, .hlist ol ol, .hlist ol ul,
 
    .hlist ul dl, .hlist ul ol, .hlist ul ul {
 
        display: inline;
 
    }
 
 
 
    .hlist .mw-empty-li,
 
    .hlist .mw-empty-elt {
 
        display: none;
 
    }
 
    .hlist dt:after {
 
        content: ": ";
 
    }
 
    .hlist dd:after,
 
    .hlist li:after {
 
        content: " · ";
 
        font-weight: bold;
 
    }
 
    .hlist dd:last-child:after,
 
    .hlist dt:last-child:after,
 
    .hlist li:last-child:after {
 
        content: none;
 
    }
 
    .hlist dd dd:first-child:before, .hlist dd dt:first-child:before, .hlist dd li:first-child:before,
 
    .hlist dt dd:first-child:before, .hlist dt dt:first-child:before, .hlist dt li:first-child:before,
 
    .hlist li dd:first-child:before, .hlist li dt:first-child:before, .hlist li li:first-child:before {
 
        content: " (";
 
        font-weight: normal;
 
    }
 
    .hlist dd dd:last-child:after, .hlist dd dt:last-child:after, .hlist dd li:last-child:after,
 
    .hlist dt dd:last-child:after, .hlist dt dt:last-child:after, .hlist dt li:last-child:after,
 
    .hlist li dd:last-child:after, .hlist li dt:last-child:after, .hlist li li:last-child:after {
 
        content: ")";
 
        font-weight: normal;
 
    }
 
    .hlist ol {
 
        counter-reset: listitem;
 
    }
 
    .hlist ol > li {
 
        counter-increment: listitem;
 
    }
 
    .hlist ol > li:before {
 
        content: " " counter(listitem) "\a0";
 
    }
 
    .hlist dd ol > li:first-child:before,
 
    .hlist dt ol > li:first-child:before,
 
    .hlist li ol > li:first-child:before {
 
        content: " (" counter(listitem) "\a0";
 
    }
 
}}
 
 
 
{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=|none=|#default=<nowiki/>
 
{{{!}} class="navbox" cellspacing="0" style="padding: 3px; {{{bodystyle|}}};{{{style|}}}"
 
{{!}}-
 
{{!}} style="padding:0px;" {{!}} }}
 
{{{!}} cellspacing="0" class="nowraplinks {{#if:{{{title|}}}|mw-collapsible mw-made-collapsible}} {{#if:{{{title|}}}|{{#switch:{{{state|}}}|plain|off=|#default=collapsible {{#if:{{{state|}}}|{{{state|}}}|autocollapse}}}}}} {{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=navbox-subgroup" style="width:100%;{{{bodystyle|}}};{{{style|}}}|#default=" style="width:100%;background:transparent;color:inherit}};{{{innerstyle|}}};" <!--
 
 
 
 
 
---Title and Navbar---
 
-->{{#if:{{{title|}}}|<nowiki/>
 
{{!}}- {{#if:{{{titlegroup|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{titlegroupstyle|}}}" {{!}} {{{titlegroup|}}}
 
! style="border-left:2px solid #fdfdfd;width:100%;|<nowiki/>
 
! style="}}{{{basestyle|}}};{{{titlestyle|}}}" colspan={{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}{{#if:{{{titlegroup|}}}|-1}}}} class="navbox-title" {{!}} {{#if:{{#switch:{{{navbar|}}}|plain|off=1}} {{#if:{{{name|}}}||{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=1}}}}| {{#ifeq:{{{navbar|}}}|off|{{#ifeq:{{{state|}}}|plain|<div style="float:right;width:6em;">&nbsp;</div>}}| {{#ifeq:{{{state|}}}|plain||<div style="float:left; width:6em;text-align:left;">&nbsp;</div>}}}}| <div style="float:left; width:6em;text-align:left;"> {{navbar|{{{name}}}|fontstyle={{{basestyle|}}};{{{titlestyle|}}};border:none;|mini=1}} </div>{{#ifeq:{{{state|}}}|plain|<div style="float:right;width:6em;">&nbsp;</div>}}}} <span style="font-size:{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=100|#default=110}}%;"> {{{title}}}</span> }}<!--
 
 
 
 
 
---Above---
 
-->{{#if:{{{above|}}}| {{#if:{{{title|}}}|<nowiki/>
 
{{!}}- style="height:0px;"
 
{{!}} }}
 
{{!}}-
 
{{!}} class="navbox-abovebelow" style="{{{basestyle|}}};{{{abovestyle|}}}" colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}" {{!}} {{{above}}} }}<!--
 
 
 
 
 
 
 
---Body---
 
 
 
---First group/list and images---
 
-->{{#if:{{{list1|}}}|{{#if:{{{title|}}}{{{above|}}}|<nowiki/>
 
{{!}}- style="height:2px;"
 
{{!}} }}
 
{{!}}-<!--
 
 
 
-->{{#if:{{{imageleft|}}}|<nowiki/>
 
{{!}} style="width:0%;padding:0px 2px 0px 0px;{{{imageleftstyle|}}}" rowspan={{#expr:1{{#if:{{{list2|}}}|+2}}{{#if:{{{list3|}}}|+2}}{{#if:{{{list4|}}}|+2}}{{#if:{{{list5|}}}|+2}}{{#if:{{{list6|}}}|+2}}{{#if:{{{list7|}}}|+2}}{{#if:{{{list8|}}}|+2}}{{#if:{{{list9|}}}|+2}}{{#if:{{{list10|}}}|+2}}{{#if:{{{list11|}}}|+2}}{{#if:{{{list12|}}}|+2}}{{#if:{{{list13|}}}|+2}}{{#if:{{{list14|}}}|+2}}{{#if:{{{list15|}}}|+2}}{{#if:{{{list16|}}}|+2}}{{#if:{{{list17|}}}|+2}}{{#if:{{{list18|}}}|+2}}{{#if:{{{list19|}}}|+2}}{{#if:{{{list20|}}}|+2}}}} {{!}} {{{imageleft|}}} }}<!--
 
 
 
-->{{#if:{{{group1|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group1style|}}}" {{!}} {{{group1}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list1style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}" {{!}} <div style="padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}}">
 
{{{list1|}}}</div><!--
 
 
 
-->{{#if:{{{image|}}}|<nowiki/>
 
{{!}} style="width:0%;padding:0px 0px 0px 2px;{{{imagestyle|}}}" rowspan={{#expr:1{{#if:{{{list2|}}}|+2}}{{#if:{{{list3|}}}|+2}}{{#if:{{{list4|}}}|+2}}{{#if:{{{list5|}}}|+2}}{{#if:{{{list6|}}}|+2}}{{#if:{{{list7|}}}|+2}}{{#if:{{{list8|}}}|+2}}{{#if:{{{list9|}}}|+2}}{{#if:{{{list10|}}}|+2}}{{#if:{{{list11|}}}|+2}}{{#if:{{{list12|}}}|+2}}{{#if:{{{list13|}}}|+2}}{{#if:{{{list14|}}}|+2}}{{#if:{{{list15|}}}|+2}}{{#if:{{{list16|}}}|+2}}{{#if:{{{list17|}}}|+2}}{{#if:{{{list18|}}}|+2}}{{#if:{{{list19|}}}|+2}}{{#if:{{{list20|}}}|+2}}}} {{!}} {{{image|}}} }} }}<!--
 
 
 
 
 
---Remaining groups/lists---
 
 
 
-->{{#if:{{{list2|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list1|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group2|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group2style|}}}" {{!}} {{{group2}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list2style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list2|}}}</div>}}<!--
 
 
 
-->{{#if:{{{list3|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list2|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group3|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group3style|}}}" {{!}} {{{group3}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list3style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list3|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list4|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list3|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group4|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group4style|}}}" {{!}} {{{group4}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list4style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list4|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list5|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list4|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group5|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group5style|}}}" {{!}} {{{group5}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list5style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list5|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list6|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list5|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group6|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group6style|}}}" {{!}} {{{group6}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list6style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list6|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list7|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list6|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group7|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group7style|}}}" {{!}} {{{group7}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list7style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list7|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list8|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list7|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group8|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group8style|}}}" {{!}} {{{group8}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list8style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list8|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list9|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list8|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group9|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group9style|}}}" {{!}} {{{group9}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list9style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list9|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list10|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list9|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group10|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group10style|}}}" {{!}} {{{group10}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list10style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list10|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list11|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list10|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group11|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group11style|}}}" {{!}} {{{group11}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list11style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list11|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list12|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list11|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group12|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group12style|}}}" {{!}} {{{group12}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list12style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list12|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list13|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list12|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group13|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group13style|}}}" {{!}} {{{group13}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list13style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list13|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list14|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list13|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group14|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group14style|}}}" {{!}} {{{group14}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list14style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list14|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list15|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list14|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group15|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group15style|}}}" {{!}} {{{group15}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list15style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list15|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list16|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list15|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group16|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group16style|}}}" {{!}} {{{group16}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list16style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list16|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list17|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list16|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group17|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group17style|}}}" {{!}} {{{group17}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list17style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list17|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list18|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list17|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group18|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group18style|}}}" {{!}} {{{group18}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list18style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list18|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list19|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list18|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group19|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group19style|}}}" {{!}} {{{group19}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list19style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list19|}}}</div> }}<!--
 
 
 
-->{{#if:{{{list20|}}}| {{#if:{{{title|}}}{{{above|}}}{{{list19|}}}|<nowiki/>
 
{{!}}- style="height:2px"
 
{{!}} }}
 
{{!}}- {{#if:{{{group20|}}}|<nowiki/>
 
{{!}} class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group20style|}}}" {{!}} {{{group20}}}
 
{{!}} style="text-align:left;border-left:2px solid #fdfdfd;|<nowiki/>
 
{{!}} colspan=2 style="}} width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list20style|}}}" class="navbox-list hlist navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}" {{!}} <div style="padding:{{{listpadding|0em 0.25em}}}">
 
{{{list20|}}}</div> }}<!--
 
 
 
---Below---
 
-->{{#if:{{{below|}}}|<!--
 
-->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}{{{list3|}}}|<nowiki/>
 
{{!}}- style="height:2px;"
 
{{!}} }}
 
{{!}}-
 
{{!}} class="navbox-abovebelow" style="{{{basestyle|}}};{{{belowstyle|}}}" colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}" {{!}} {{{below}}} }}
 
{{!}}}{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=|none=|#default=<nowiki/>
 
{{!}}} }}
 
 
 
<noinclude>
 
 
[[Category:Templates]]
 
[[Category:Templates]]
 
[[Category:Organization Templates]]
 
[[Category:Organization Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 19:05, 11 August 2020

Template documentation[view] [edit] [history] [purge]
Parts of this page were taken from the The English Wikipedia's documentation on the Navbox template.

This navigational template creates a box with a long list of organized links, so that a user can move between similar pages quickly. The template has default CSS styling, which can be changed as needed, although this is not recommended. This template should be used in a variety of places throughout the wiki because of its ease of use and standardization.

Parameters

name – The name of the Navbox
title – The title of the Navbox (shown at the top)
titlestyle – A CSS style for the title-bar, such as: background: aqua;
groupstyle – A CSS style for the group-cells, such as: background: #f516db;
above – Text to appear above the group/list section
image – An optional right-side image, coded as the whole image. Typically it is purely decorative, so it should be coded as [[File:XX.jpg|80px|link=|alt=]].
imageleft – An optional left-side image (code the same as the "image" parameter).
groupn – The left-side text before list-n (if group-n omitted, list-n extends to the left edge of the box, and defaults to text-align:center styling).
listn – Text listing wikilinks using a hlist format (where the wikilinks are styled as a horizontal list).
below – Optional text to appear below the group/list section.

Examples

A Simple Navbox Showing Layout


 {{Navbox
 | name  = Navbox
 | title = Title
 | listclass = hlist
 | above = Above

 | image = [[File:StateMembership2019.jpeg | 200px]]

 | group1 = Group1
 | list1  = List1

 | group2 = Group2
 | list2  =
 * List 1
 * List 2

 | group3 = Group3
 | list3  =
 * List 1
 * List 2
 * List 3

 | group4 = Group4
 | list4  =
 * List 1
 * List 2
 * List 3
 * List 4

 | group5 = Group5
 | list5  =
 * List 1
 * List 2
 * List 3
 * List 4
 * List 5

 | below = Below

 }}

Adding Subgroups and using Imageleft

{{Navbox
 | name  = Navbox
 | title = Title
 | listclass = hlist
 | above = Above

 | imageleft = [[File:StateMembership2019.jpeg | 200px]]

 | group1 = Group1
 | list1  = List1

 | group2 = Group2
 | list2  = * List 1 * List 2

 | group3 = Group3
 | list3  = * List 1 * List 2 * List 3

 | group4 = Group4
 | list4  = * List 1 * List 2 * List 3 * List 4

 | group5 = Group5
 | list5  = {{Navbox|child
      | group1 = ChildGroup1
      | list1 = ChildList1

      | group2 = ChildGroup2
      | list2 = ChildList2
 }}

 | below = Below
 }}