Template:Navbox: Difference between revisions
From BoyWiki
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
-->{{#if:{{{title|}}}|<tr>{{#if:{{{titlegroup|}}}|<!-- | -->{{#if:{{{title|}}}|<tr>{{#if:{{{titlegroup|}}}|<!-- | ||
--><td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{titlegroupstyle|}}}">{{{titlegroup|}}}</td><!-- | --><td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{titlegroupstyle|}}}">{{{titlegroup|}}}</td><!-- | ||
--><th style="border-left:2px solid # | --><th style="border-left:2px solid #fdfdfd;width:100%;|<th style="}}{{{basestyle|}}};{{{titlestyle|}}}" <!-- | ||
-->colspan={{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}{{#if:{{{titlegroup|}}}|-1}}}} <!-- | -->colspan={{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}{{#if:{{{titlegroup|}}}|-1}}}} <!-- | ||
-->class="navbox-title"><!-- | -->class="navbox-title"><!-- | ||
Line 79: | Line 79: | ||
-->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!-- | -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!-- | ||
-->{{#if:{{{group2|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group2style|}}}"><!-- | -->{{#if:{{{group2|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group2style|}}}"><!-- | ||
-->{{{group2}}}</td><td style="text-align:left;border-left:2px solid # | -->{{{group2}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- | ||
-->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list2style|}}}" <!-- | -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list2style|}}}" <!-- | ||
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- | -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- | ||
Line 87: | Line 87: | ||
-->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!-- | -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!-- | ||
-->{{#if:{{{group3|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group3style|}}}"><!-- | -->{{#if:{{{group3|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group3style|}}}"><!-- | ||
-->{{{group3}}}</td><td style="text-align:left;border-left:2px solid # | -->{{{group3}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- | ||
-->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list3style|}}}" <!-- | -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list3style|}}}" <!-- | ||
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- | -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- | ||
Line 95: | Line 95: | ||
--><tr style="height:2px"><td></td></tr><tr><!-- | --><tr style="height:2px"><td></td></tr><tr><!-- | ||
-->{{#if:{{{group4|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group4style|}}}"><!-- | -->{{#if:{{{group4|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group4style|}}}"><!-- | ||
-->{{{group4}}}</td><td style="text-align:left;border-left:2px solid # | -->{{{group4}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- | ||
-->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list4style|}}}" <!-- | -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list4style|}}}" <!-- | ||
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- | -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- | ||
Line 103: | Line 103: | ||
--><tr style="height:2px"><td></td></tr><tr><!-- | --><tr style="height:2px"><td></td></tr><tr><!-- | ||
-->{{#if:{{{group5|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group5style|}}}"><!-- | -->{{#if:{{{group5|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group5style|}}}"><!-- | ||
-->{{{group5}}}</td><td style="text-align:left;border-left:2px solid # | -->{{{group5}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- | ||
-->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list5style|}}}" <!-- | -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list5style|}}}" <!-- | ||
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- | -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- | ||
Line 111: | Line 111: | ||
--><tr style="height:2px"><td></td></tr><tr><!-- | --><tr style="height:2px"><td></td></tr><tr><!-- | ||
-->{{#if:{{{group6|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group6style|}}}"><!-- | -->{{#if:{{{group6|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group6style|}}}"><!-- | ||
-->{{{group6}}}</td><td style="text-align:left;border-left:2px solid # | -->{{{group6}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- | ||
-->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list6style|}}}" <!-- | -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list6style|}}}" <!-- | ||
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- | -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- | ||
Line 119: | Line 119: | ||
--><tr style="height:2px"><td></td></tr><tr><!-- | --><tr style="height:2px"><td></td></tr><tr><!-- | ||
-->{{#if:{{{group7|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group7style|}}}"><!-- | -->{{#if:{{{group7|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group7style|}}}"><!-- | ||
-->{{{group7}}}</td><td style="text-align:left;border-left:2px solid # | -->{{{group7}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- | ||
-->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list7style|}}}" <!-- | -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list7style|}}}" <!-- | ||
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- | -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- | ||
Line 127: | Line 127: | ||
--><tr style="height:2px"><td></td></tr><tr><!-- | --><tr style="height:2px"><td></td></tr><tr><!-- | ||
-->{{#if:{{{group8|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group8style|}}}"><!-- | -->{{#if:{{{group8|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group8style|}}}"><!-- | ||
-->{{{group8}}}</td><td style="text-align:left;border-left:2px solid # | -->{{{group8}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- | ||
-->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list8style|}}}" <!-- | -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list8style|}}}" <!-- | ||
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- | -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- | ||
Line 151: | Line 151: | ||
--><tr style="height:2px"><td></td></tr><tr><!-- | --><tr style="height:2px"><td></td></tr><tr><!-- | ||
-->{{#if:{{{group11|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group11style|}}}"><!-- | -->{{#if:{{{group11|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group11style|}}}"><!-- | ||
-->{{{group11}}}</td><td style="text-align:left;border-left:2px solid # | -->{{{group11}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- | ||
-->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list11style|}}}" <!-- | -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list11style|}}}" <!-- | ||
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- | -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- | ||
Line 159: | Line 159: | ||
--><tr style="height:2px"><td></td></tr><tr><!-- | --><tr style="height:2px"><td></td></tr><tr><!-- | ||
-->{{#if:{{{group12|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group12style|}}}"><!-- | -->{{#if:{{{group12|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group12style|}}}"><!-- | ||
-->{{{group12}}}</td><td style="text-align:left;border-left:2px solid # | -->{{{group12}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- | ||
-->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list12style|}}}" <!-- | -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list12style|}}}" <!-- | ||
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- | -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- | ||
Line 183: | Line 183: | ||
--><tr style="height:2px"><td></td></tr><tr><!-- | --><tr style="height:2px"><td></td></tr><tr><!-- | ||
-->{{#if:{{{group15|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group15style|}}}"><!-- | -->{{#if:{{{group15|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group15style|}}}"><!-- | ||
-->{{{group15}}}</td><td style="text-align:left;border-left:2px solid # | -->{{{group15}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- | ||
-->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list15style|}}}" <!-- | -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list15style|}}}" <!-- | ||
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- | -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- | ||
Line 199: | Line 199: | ||
--><tr style="height:2px"><td></td></tr><tr><!-- | --><tr style="height:2px"><td></td></tr><tr><!-- | ||
-->{{#if:{{{group17|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group17style|}}}"><!-- | -->{{#if:{{{group17|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group17style|}}}"><!-- | ||
-->{{{group17}}}</td><td style="text-align:left;border-left:2px solid # | -->{{{group17}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- | ||
-->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list17style|}}}" <!-- | -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list17style|}}}" <!-- | ||
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- | -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- | ||
Line 215: | Line 215: | ||
--><tr style="height:2px"><td></td></tr><tr><!-- | --><tr style="height:2px"><td></td></tr><tr><!-- | ||
-->{{#if:{{{group19|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group19style|}}}"><!-- | -->{{#if:{{{group19|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group19style|}}}"><!-- | ||
-->{{{group19}}}</td><td style="text-align:left;border-left:2px solid # | -->{{{group19}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- | ||
-->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list19style|}}}" <!-- | -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list19style|}}}" <!-- | ||
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- | -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- | ||
Line 223: | Line 223: | ||
--><tr style="height:2px"><td></td></tr><tr><!-- | --><tr style="height:2px"><td></td></tr><tr><!-- | ||
-->{{#if:{{{group20|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group20style|}}}"><!-- | -->{{#if:{{{group20|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{group20style|}}}"><!-- | ||
-->{{{group20}}}</td><td style="text-align:left;border-left:2px solid # | -->{{{group20}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- | ||
-->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list20style|}}}" <!-- | -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list20style|}}}" <!-- | ||
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- | -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- |
Revision as of 20:15, 8 June 2015
BoyWiki Template documentation (for the above template, sometimes hidden or invisible)
- Description
- This template is used to create a basic navbox.
- Syntax
- For more information see: https://en.wikipedia.org/wiki/Template:Navbox/doc
Parameter list
|
The navbox uses lowercase parameter names, as shown in the box (above). The required name and title will create a one-line box if other parameters are omitted.
Notice "group1" (etc.) is optional, as are sections named "above/below".
The basic and most common parameters are as follows (see below for the full list):
name
– the name of the template.title
– text in the title bar, such as: [[Widget stuff]].listclass
– a CSS class for the list cells, usuallyhlist
for horizontal lists. Alternatively, use bodyclass for the whole box.state
– controls when a navbox is expanded or collapsed.titlestyle
– a CSS style for the title-bar, such as:background: gray;
groupstyle
– a CSS style for the group-cells, such as:background: #eee;
above
– text to appear above the group/list section (could be a list of overall wikilinks).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 starts at left of box).listn
– text listing wikilinks using a wikilist format.below
– optional text to appear below the group/list section.- Sample output
{{Navbox | name = Navbox Test | state = uncollapsed | title = test | above = test | abovestyle = background:#cedff2; | listclass = hlist | titlestyle = {{{titlestyle|background:#cedff2;}}} | groupstyle = line-height:1.2em;{{{groupstyle|background:#cedff2;}}} | image = | group1 = test | list1 = '''{{bp}} test | group2 = test | list2style = line-height:1.2em;{{{list2style|background:#f5faff;}}} | list2 = *test *test *test *test *test *test | group3 = test | list3style = line-height:1.2em; | list3 = *test *test *test *test *test *test <BR> | belowstyle = background:#cedff2; |below = test [[File:Bloge.png|30 px|link=Portal:Boylove News Channel]] }}
Results in...
|
Visit Template:Navbox/doc to edit this template's description!
Done making changes? Refresh Also see: Portal:Template index and Help:Templates
Done making changes? Refresh Also see: Portal:Template index and Help:Templates