Site News
Warning: This wiki contains spoilers. Read at your own risk!

Social media: If you would like, please join our Discord server, and/or follow us on Twitter (X) or Tumblr!

Template:Tab: Difference between revisions

From Fire Emblem Wiki, your source on Fire Emblem information. By fans, for fans.
(Undo revision 17558 by BrandedOne (talk))
(It should be simple enough to edit now. Feel free to call me up if there are any issues with it)
Line 1: Line 1:
{{#vardefine:name|{{{name|tab}}}}}<!--
{| align="center" style="width: 500px; {{#if:{{{header|}}}|border: 1px solid {{Color2}}; {{round}}; background: {{Color3}};}}"
-->{{#vardefine:TabCount|{{TempCounter|{{{tab1}}}|{{{tab2|}}}|{{{tab3|}}}|{{{tab4|}}}|{{{tab5|}}}|{{{tab6|}}}|{{{tab7|}}}|{{{tab8|}}}|{{{tab9|}}}|{{{tab10|}}}|{{{tab11|}}}|{{{tab12|}}}}}}}<!--
{{#if:{{{header|}}}|{{!}}<div style="{{round}}; border: 1px solid {{Color2}}; background: {{Color1}}; text-align:center; padding:3px;"><big>'''{{{header}}}'''</big></div>}}
-->{{#vardefine:TabA|{{!}} style="{{round}}; width: 4px; border: none; background: none;" {{!}} {{!}}{{!}}}}<!--
-->{{#vardefine:TabB|style="{{roundt|5px}}; font-size: 90%; whitespace: nowrap; padding-left: 2px; padding-right: 2px; margin: 20px; border: 2px solid {{Color2}}; background: {{Color1}};"}}<!--
-->{{#vardefine:TabC|{{!}} style="{{round}}; width: 30px; border: none; background: none;" {{!}} }}<!--
-->{{#vardefine:UpperTabs|{{#switch:{{#var:TabCount}}
|7=
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}5">{{{tab5}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}6">{{{tab6}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}7">{{{tab7}}}</span>
|8=
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}5">{{{tab5}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}6">{{{tab6}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}7">{{{tab7}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}8">{{{tab8}}}</span>
|9=
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}6">{{{tab6}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}7">{{{tab7}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}8">{{{tab8}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}9">{{{tab9}}}</span>
|10=
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}6">{{{tab6}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}7">{{{tab7}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}8">{{{tab8}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}9">{{{tab9}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}10">{{{tab10}}}</span>
|11=
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}7">{{{tab7}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}8">{{{tab8}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}9">{{{tab9}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}10">{{{tab10}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}11">{{{tab11}}}</span>
|12=
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}7">{{{tab7}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}8">{{{tab8}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}9">{{{tab9}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}10">{{{tab10}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}11">{{{tab11}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}12">{{{tab12}}}</span>
}}}}<!--
-->{{#vardefine:LowerTabs|{{#switch:{{#var:TabCount}}
|1=
{{#var:TabC}}
{{!}}        {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}1">{{{tab1}}}</span>
{{#var:TabC}}
|2=
{{#var:TabC}}
{{!}}        {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}1">{{{tab1}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}2">{{{tab2}}}</span>
{{#var:TabC}}
|3=
{{#var:TabC}}
{{!}}        {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}1">{{{tab1}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}2">{{{tab2}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}3">{{{tab3}}}</span>
{{#var:TabC}}
|4=
{{#var:TabC}}
{{!}}        {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}1">{{{tab1}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}2">{{{tab2}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}3">{{{tab3}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}4">{{{tab4}}}</span>
{{#var:TabC}}
|5=
{{#var:TabC}}
{{!}}        {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}1">{{{tab1}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}2">{{{tab2}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}3">{{{tab3}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}4">{{{tab4}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}5">{{{tab5}}}</span>
{{#var:TabC}}
|6=
{{#var:TabC}}
{{!}}        {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}1">{{{tab1}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}2">{{{tab2}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}3">{{{tab3}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}4">{{{tab4}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}5">{{{tab5}}}</span>
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}6">{{{tab6}}}</span>
{{#var:TabC}}
|7|8=
{{!}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}1">{{{tab1}}}</span>
{{!}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}2">{{{tab2}}}</span>
{{!}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}3">{{{tab3}}}</span>
{{!}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}4">{{{tab4}}}</span>
|9|10=
{{!}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}1">{{{tab1}}}</span>
{{!}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}2">{{{tab2}}}</span>
{{!}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}3">{{{tab3}}}</span>
{{!}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}4">{{{tab4}}}</span>
{{!}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}5">{{{tab5}}}</span>
|11|12=
{{!}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}1">{{{tab1}}}</span>
{{!}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}2">{{{tab2}}}</span>
{{!}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}3">{{{tab3}}}</span>
{{!}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}4">{{{tab4}}}</span>
{{!}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}5">{{{tab5}}}</span>
{{!}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}6">{{{tab6}}}</span>
}}}}
{| align="center" style="{{round|20px}}; {{#if:{{{width|}}}|width:{{{width|}}};}} clear: both; text-align: center; {{#if:{{{header|}}}|margin: 0.3em auto; background-color: {{Color3}}; border: 2px solid {{Color2}};}}"
{{#if:{{{header|}}}|{{!-}}
{{!}} valign="middle" style="{{round}}; text-align: center; width: 98%; background-color:{{Color2}}; border: 1px solid {{Color2}}" {{!}}<div style="text-align:center;position:relative;white-space:nowrap;">'''{{{header}}}'''</div>}}
|-
|-
| style="{{round}}; padding-top: 15px;" valign="top"| <div style="{{round}}; position: top; border: 0px;"> <div style="position: relative; text-align: center; padding-bottom: 0px; background-color: transparent; border-bottom: 0px solid {{Color2}}; ">
|
{{#ifexpr: {{#var:TabCount}} > 6|
<div class=tabcontainer style="padding-bottom:2px; margin: 1em 4px 0; white-space: nowrap; text-align:center">
<table style="{{round}}; position: relative; " align="center" cellpadding="0" cellspacing="0" width=100%>
<span class="tab {{#ifeq:{{{default|1}}}|1|tabselected}}">{{{tab1}}}</span> <!--
{{#var:UpperTabs}}
--><span class="tab {{#ifeq:{{{default}}}|2|tabselected}}">{{{tab2}}}</span> <!--
{{#var:TabA}}
-->{{Tab/Tab|3|{{{default}}}|{{{tab3|}}}}} <!--
</table>
-->{{Tab/Tab|4|{{{default}}}|{{{tab4|}}}}} <!--
}}
-->{{Tab/Tab|5|{{{default}}}|{{{tab5|}}}}} <!--
{| style="{{round}}; position: relative; " align="center" cellpadding="0" cellspacing="0" width=100%
-->{{Tab/Tab|6|{{{default}}}|{{{tab6|}}}}} <!--
{{#var:LowerTabs}}
-->{{Tab/Tab|7|{{{default}}}|{{{tab7|}}}}} <!--
|} </div>
-->{{Tab/Tab|8|{{{default}}}|{{{tab8|}}}}} <!--
<div style="{{round}}; position: relative; font-size: 90%; padding-top: 3px; padding-left: 10px; padding-right: 10px; background-color: {{Color3}}; border: 1px solid {{Color2}}; {{#if:{{{height|}}}|height:{{{height|}}};}}">
-->{{Tab/Tab|9|{{{default}}}|{{{tab9|}}}}} <!--
<div class="tabcontent">
-->{{Tab/Tab|10|{{{default}}}|{{{tab10|}}}}} <!--
{{#ifeq:{{{default|1}}}
-->{{Tab/Tab|11|{{{default}}}|{{{tab11|}}}}} <!--
  |1
-->{{Tab/Tab|12|{{{default}}}|{{{tab12|}}}}} <!--
  |{{toggle|{{{content1|}}}||{{#var:name}}1 {{#var:name}}s}}
-->{{Tab/Tab|13|{{{default}}}|{{{tab13|}}}}} <!--
  |{{toggle||{{{content1|}}}|{{#var:name}}1 {{#var:name}}s}}
-->{{Tab/Tab|14|{{{default}}}|{{{tab14|}}}}} <!--
}}
-->{{Tab/Tab|15|{{{default}}}|{{{tab15|}}}}}
{{#ifeq:{{{default}}}
</div>
  |2
<div class=tabcontents style="padding: 4px; {{#if:{{{height|}}}|height:{{{height}}};}} {{#if:{{{header|}}}|border:2px solid {{Color2}}; {{roundb|11px}};}}">
  |{{toggle|{{{content2|}}}||{{#var:name}}2 {{#var:name}}s}}
<div {{#ifeq:{{{default|1}}}|1|style="display:block"}}>{{{content1}}}</div>
  |{{toggle||{{{content2|}}}|{{#var:name}}2 {{#var:name}}s}}
<div {{#ifeq:{{{default}}}|2|style="display:block"}}>{{{content2}}}</div>
}}
{{Tab/Content|3|{{{default}}}|{{{tab3|}}}|{{{content3}}}}}
{{#ifeq:{{{default}}}
{{Tab/Content|4|{{{default}}}|{{{tab4|}}}|{{{content4}}}}}
  |3
{{Tab/Content|5|{{{default}}}|{{{tab5|}}}|{{{content5}}}}}
  |{{toggle|{{{content3|}}}||{{#var:name}}3 {{#var:name}}s}}
{{Tab/Content|6|{{{default}}}|{{{tab6|}}}|{{{content6}}}}}
  |{{toggle||{{{content3|}}}|{{#var:name}}3 {{#var:name}}s}}
{{Tab/Content|7|{{{default}}}|{{{tab7|}}}|{{{content7}}}}}
}}
{{Tab/Content|8|{{{default}}}|{{{tab8|}}}|{{{content8}}}}}
{{#ifeq:{{{default}}}
{{Tab/Content|9|{{{default}}}|{{{tab9|}}}|{{{content9}}}}}
  |4
{{Tab/Content|10|{{{default}}}|{{{tab10|}}}|{{{content10}}}}}
  |{{toggle|{{{content4|}}}||{{#var:name}}4 {{#var:name}}s}}
{{Tab/Content|11|{{{default}}}|{{{tab11|}}}|{{{content11}}}}}
  |{{toggle||{{{content4|}}}|{{#var:name}}4 {{#var:name}}s}}
{{Tab/Content|12|{{{default}}}|{{{tab12|}}}|{{{content12}}}}}
}}
{{Tab/Content|13|{{{default}}}|{{{tab13|}}}|{{{content13}}}}}
{{#ifeq:{{{default}}}
{{Tab/Content|14|{{{default}}}|{{{tab14|}}}|{{{content14}}}}}
  |5
{{Tab/Content|15|{{{default}}}|{{{tab15|}}}|{{{content15}}}}}
  |{{toggle|{{{content5|}}}||{{#var:name}}5 {{#var:name}}s}}
</div>
  |{{toggle||{{{content5|}}}|{{#var:name}}5 {{#var:name}}s}}
}}
{{#ifeq:{{{default}}}
  |6
  |{{toggle|{{{content6|}}}||{{#var:name}}6 {{#var:name}}s}}
  |{{toggle||{{{content6|}}}|{{#var:name}}6 {{#var:name}}s}}
}}
{{#ifeq:{{{default}}}
  |7
  |{{toggle|{{{content7|}}}||{{#var:name}}7 {{#var:name}}s}}
  |{{toggle||{{{content7|}}}|{{#var:name}}7 {{#var:name}}s}}
}}
{{#ifeq:{{{default}}}
  |8
  |{{toggle|{{{content8|}}}||{{#var:name}}8 {{#var:name}}s}}
  |{{toggle||{{{content8|}}}|{{#var:name}}8 {{#var:name}}s}}
}}
{{#ifeq:{{{default}}}
  |9
  |{{toggle|{{{content9|}}}||{{#var:name}}9 {{#var:name}}s}}
  |{{toggle||{{{content9|}}}|{{#var:name}}9 {{#var:name}}s}}
}}
{{#ifeq:{{{default}}}
  |10
  |{{toggle|{{{content10|}}}||{{#var:name}}10 {{#var:name}}s}}
  |{{toggle||{{{content10|}}}|{{#var:name}}10 {{#var:name}}s}}
}}
{{#ifeq:{{{default}}}
  |11
  |{{toggle|{{{content11|}}}||{{#var:name}}11 {{#var:name}}s}}
  |{{toggle||{{{content11|}}}|{{#var:name}}11 {{#var:name}}s}}
}}
{{#ifeq:{{{default}}}
  |12
  |{{toggle|{{{content12|}}}||{{#var:name}}12 {{#var:name}}s}}
  |{{toggle||{{{content12|}}}|{{#var:name}}12 {{#var:name}}s}}
}}
</div></div></div>
|}<noinclude>
|}<noinclude>


==Purpose==
==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 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. By design, the template will display all the tab contents if the javascript does not load properly.


==Usage==
==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.  
This template currently supports up to 15 tabs. This template should usually only be to create navigation boxes.  
To use this template, start with this layout:
To use this template, start with this layout:
<pre>
<pre>
{{Tab
{{Tab
|name    =
|header  =
|header  =
|width    =
|width    =
Line 196: Line 57:
|tab3    =
|tab3    =
|content3 =
|content3 =
|tab4    =
...
|content4 =
|tab14   =
|tab5    =
|content14=
|content5 =
|tab15   =
|tab6    =
|content15=
|content6 =
|tab7    =
|content7 =
|tab8    =
|content8 =
|tab9    =
|content9 =
|tab10    =
|content10=
|tab11   =
|content11=
|tab12   =
|content12=
}}
}}
</pre>
</pre>
'''name''': A unique ID for the nav template that no other nav template has. It has to be unique and it can't have any special characters like commas, parenthesis, colons, ect. And it can't have any spaces. This is required to make sure it behaves correctly. If two nav templates that use this template are placed on the same page with the same name ID, they will not behave correctly. It also prevents possible bugs with other toggling functions. ''(Required.)''
'''header''': The content you want to display in the header field of the template. If left blank, the tabs will not be in a stylized container. ''(Optional.)''
 
'''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. ''(Optional.)''


'''width''': The width of the navigation template. Fits to the contents if left blank. You should base this on what makes the tabs themselves look best. ''(Optional.)''
'''width''': The width of the navigation template. Defaults to "500px" if left blank. You should base this on what makes the contents look best. ''(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.)''
'''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.)''
'''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 <nowiki>link=</nowiki> 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.)''
'''tab#''': The name of each tab. It's best 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 <nowiki>"link="</nowiki> parameter. If you neglect to do this, clicking the tab will take you to the that page instead of loading the contents. ''(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 width and height parameters to make the whole template look its best. ''(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 width and height parameters to make the whole template look its best. ''(Required.)''

Revision as of 21:17, 20 August 2011

{{{tab1}}} {{{tab2}}}

{{{content1}}}
{{{content2}}}

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. By design, the template will display all the tab contents if the javascript does not load properly.

Usage

This template currently supports up to 15 tabs. This template should usually only be to create navigation boxes. To use this template, start with this layout:

{{Tab
|header   =
|width    =
|height   =
|default  =
|tab1     =
|content1 =
|tab2     =
|content2 =
|tab3     =
|content3 =
...
|tab14    =
|content14=
|tab15    =
|content15=
}}

header: The content you want to display in the header field of the template. If left blank, the tabs will not be in a stylized container. (Optional.)

width: The width of the navigation template. Defaults to "500px" if left blank. You should base this on what makes the contents look best. (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. It's best 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. If you neglect to do this, clicking the tab will take you to the that page instead of loading the contents. (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 width and height parameters to make the whole template look its best. (Required.)

Examples

To see examples of using this template, see the templates:

Origins

This template originated from Zelda Wiki.