Template:Tab

From 100% Orange Juice Wiki
Revision as of 15:35, 3 November 2018 by Shockbowlocke (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
{{{tab1}}}{{{tab2}}}

{{{content1}}}

Template-info.png Template documentation

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 and much easier to get around.

This template can create up to 30 tabs. They will automatically break into multiple lines if the container is too narrow.

Usage

To use this template, start with this layout:

{{Tab
|header=
|width=
|height=
|tabwidth=
|default=
|fallback=
|tab1=
|content1=
|tab2=
|content2=
|tab3=
|content3=
...
|tab17=
|content17=
|tab18=
|content18=
}}

Parameters

header – (Optional) The title for the tab container. If left blank, the tabs will not be in a stylized container.
width – (Optional) The width of the container. Spans the entire screen if left blank.
height – (Optional) 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.
tabwidth – (Optional) The width of each tab. Fits to the contents if left blank.
default – (Optional) The tab to display when the page first loads. Defaults to "1"
fallback – (Optional) The tab to load in case javascript does not load. The default tab also loads in case of error.
tab# – The name of each tab. Try to keep the names short as long names tend to look bad. 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. If you neglect to do this, clicking the tab will take you to the that page instead of loading the tab.
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 width and height parameters to make the whole template look its best.