Navigation menu

Template:Tab

From Metroid Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


Purpose

This template is a tool to create navigation templates with a tabbed layout. This condenses the overall size of the navigation template but still offers everything in it.

This makes navigation templates with a lot of content far less intimidating, much easier to navigate, and more aesthetically pleasing.

Usage

This is a very complex template and has to be carefully used. It should usually only be used on other templates to create a navigation box.

To use this template, begin with this layout:

{{Tab
|header   =
|height   =
|default  =
|tab1     =
|content1 =
|tab2     =
|content2 =
|tab3     =
|content3 =
|tab4     =
|content4 =
|tab5     =
|content5 =
|tab6     =
|content6 =
|tab7     =
|content7 =
|tab8     =
|content8 =
|tab9     =
|content9 =
|tab10    =
|content10=
|tab11    =
|content11=
|tab12    =
|content12=
}}

header: The content you want to display in the header field of the template. If left blank, the tabs will not be in a container. Images may be used here as well. (Optional.)

height: The height of the tab contents section. Fits to the contents if left blank. Base this on the largest content tab. Usually 20px per line works best. You may wish to add an addition 20px to account for the bolding that happens when you're on the page for a link, as this might add a new line. (Optional.)

default:The tab to display when the page first loads. Defaults to "1". (Optional.)

tab#: The name of each tab. Try to keep the names short. Long names will look bad. Limit of twelve tabs. You can also use images here. However, if you do, they should be entered with a blank link= parameter, or the linking to nothing option of Template:Image, so the image doesn't link to any page. If you neglect to do this, clicking the tab will take you to the that page instead of loading the tab. (Required.)

content#: The content you want to display for each tab. There is no limit here, but you may want to insert line breaks and adjust the height parameter to make the whole template look its best. (Required.)

Examples

To see examples of this template in use, see the templates:

{{Space Pirates-nav}}, {{Planet-nav}}, {{MP1 Rooms-nav}}. More examples can be found in the Navigation Templates category.

Origins

This template originated from Zelda Wiki.