Navigation menu

Template:Tab: Difference between revisions

From Metroid Wiki
m (Theoretically, this should work.....)
 
(use updated tabs gadget)
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{#vardefine:name|{{{name|tab}}}}}<!--
<includeonly><templatestyles src="Template:Tab/styles.css" /><div class="t-tabs-container">{{#if:{{{header|}}}|<div class="t-tabs-header">{{{header|}}}</div>}}<div class="tabheader"><!--
-->{{#vardefine:TabCount|{{TempCounter|{{{tab1}}}|{{{tab2|}}}|{{{tab3|}}}|{{{tab4|}}}|{{{tab5|}}}|{{{tab6|}}}|{{{tab7|}}}|{{{tab8|}}}|{{{tab9|}}}|{{{tab10|}}}|{{{tab11|}}}|{{{tab12|}}}}}}}<!--
-->{{#if:{{{tab1|}}}|<span class="tab {{{class1|}}} {{#ifeq:{{{default|1}}}|1|active}}">{{{tab1|}}}</span>}}<!--
-->{{#vardefine:TabA|{{!}} style="{{round}}; width: 4px; border: none; background: none;" {{!}} {{!}}{{!}}}}<!--  
-->{{#if:{{{tab2|}}}|<span class="tab {{{class2|}}} {{#ifeq:{{{default|}}}|2|active}}">{{{tab2|}}}</span>}}<!--
-->{{#vardefine:TabB|style="{{round}}; font-size: 90%; whitespace: nowrap; padding-left: 2px; padding-right: 2px; margin: 20px; border: 2px solid #{{Mw color light}}; border-bottom: 1px solid #{{Mw color light}};  background: #{{Mw color}};"}}<!--
-->{{#if:{{{tab3|}}}|<span class="tab {{{class3|}}} {{#ifeq:{{{default|}}}|3|active}}">{{{tab3|}}}</span>}}<!--
-->{{#vardefine:TabC|{{!}} style="{{round}}; width: 30px; border: none; background: none;" {{!}} }}<!--
-->{{#if:{{{tab4|}}}|<span class="tab {{{class4|}}} {{#ifeq:{{{default|}}}|4|active}}">{{{tab4|}}}</span>}}<!--
-->{{#vardefine:UpperTabs|{{#switch:{{#var:TabCount}}
-->{{#if:{{{tab5|}}}|<span class="tab {{{class5|}}} {{#ifeq:{{{default|}}}|5|active}}">{{{tab5|}}}</span>}}<!--
|7=
-->{{#if:{{{tab6|}}}|<span class="tab {{{class6|}}} {{#ifeq:{{{default|}}}|6|active}}">{{{tab6|}}}</span>}}<!--
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}5">{{{tab5}}}</span>
-->{{#if:{{{tab7|}}}|<span class="tab {{{class7|}}} {{#ifeq:{{{default|}}}|7|active}}">{{{tab7|}}}</span>}}<!--
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}6">{{{tab6}}}</span>
-->{{#if:{{{tab8|}}}|<span class="tab {{{class8|}}} {{#ifeq:{{{default|}}}|8|active}}">{{{tab8|}}}</span>}}<!--
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}7">{{{tab7}}}</span>
-->{{#if:{{{tab9|}}}|<span class="tab {{{class9|}}} {{#ifeq:{{{default|}}}|9|active}}">{{{tab9|}}}</span>}}<!--
|8=
-->{{#if:{{{tab10|}}}|<span class="tab {{{class10|}}} {{#ifeq:{{{default|}}}|10|active}}">{{{tab10|}}}</span>}}<!--
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}5">{{{tab5}}}</span>
-->{{#if:{{{tab11|}}}|<span class="tab {{{class11|}}} {{#ifeq:{{{default|}}}|11|active}}">{{{tab11|}}}</span>}}<!--
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}6">{{{tab6}}}</span>
-->{{#if:{{{tab12|}}}|<span class="tab {{{class12|}}} {{#ifeq:{{{default|}}}|12|active}}">{{{tab12|}}}</span>}}<!--
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}7">{{{tab7}}}</span>
--></div><div class="tabcontents" {{#if:{{{height|}}}|style="height: {{{height|}}}"}}><!--
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}8">{{{tab8}}}</span>
-->{{#if:{{{content1|}}}|<div class="content {{#ifeq:{{{default|1}}}|1|content--active}}">
|9=
{{{content1|}}}</div>}}<!--
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}6">{{{tab6}}}</span>
-->{{#if:{{{content2|}}}|<div class="content {{#ifeq:{{{default|}}}|2|content--active}}">
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}7">{{{tab7}}}</span>
{{{content2|}}}</div>}}<!--
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}8">{{{tab8}}}</span>
-->{{#if:{{{content3|}}}|<div class="content {{#ifeq:{{{default|}}}|3|content--active}}">
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}9">{{{tab9}}}</span>
{{{content3|}}}</div>}}<!--
|10=
-->{{#if:{{{content4|}}}|<div class="content {{#ifeq:{{{default|}}}|4|content--active}}">
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}6">{{{tab6}}}</span>
{{{content4|}}}</div>}}<!--
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}7">{{{tab7}}}</span>
-->{{#if:{{{content5|}}}|<div class="content {{#ifeq:{{{default|}}}|5|content--active}}">
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}8">{{{tab8}}}</span>
{{{content5|}}}</div>}}<!--
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}9">{{{tab9}}}</span>
-->{{#if:{{{content6|}}}|<div class="content {{#ifeq:{{{default|}}}|6|content--active}}">
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}10">{{{tab10}}}</span>
{{{content6|}}}</div>}}<!--
|11=
-->{{#if:{{{content7|}}}|<div class="content {{#ifeq:{{{default|}}}|7|content--active}}">
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}7">{{{tab7}}}</span>
{{{content7|}}}</div>}}<!--
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}8">{{{tab8}}}</span>
-->{{#if:{{{content8|}}}|<div class="content {{#ifeq:{{{default|}}}|8|content--active}}">
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}9">{{{tab9}}}</span>
{{{content8|}}}</div>}}<!--
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}10">{{{tab10}}}</span>
-->{{#if:{{{content9|}}}|<div class="content {{#ifeq:{{{default|}}}|9|content--active}}">
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}11">{{{tab11}}}</span>
{{{content9|}}}</div>}}<!--
|12=
-->{{#if:{{{content10|}}}|<div class="content {{#ifeq:{{{default|}}}|10|content--active}}">
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}7">{{{tab7}}}</span>
{{{content10|}}}</div>}}<!--
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}8">{{{tab8}}}</span>
-->{{#if:{{{content11|}}}|<div class="content {{#ifeq:{{{default|}}}|11|content--active}}">
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}9">{{{tab9}}}</span>
{{{content11|}}}</div>}}<!--
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}10">{{{tab10}}}</span>
-->{{#if:{{{content12|}}}|<div class="content {{#ifeq:{{{default|}}}|12|content--active}}">
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}11">{{{tab11}}}</span>
{{{content12|}}}</div>}}<!--
{{#var:TabA}} {{#var:TabB}} {{!}} <span class="_toggler_hide-{{#var:name}}s _toggler_show-{{#var:name}}12">{{{tab12}}}</span>
--></div></div></includeonly><noinclude>
}}}}<!--
-->{{#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}}; {{#if:{{{width|}}}|width:{{{width|}}};}} clear: both; text-align: center; {{#if:{{{header|}}}|margin: 0.3em auto; background: #{{Mw color}}; border: 1px solid #{{Mw color light}};}}"
{{#if:{{{header|}}}|{{!-}}
{{!}} valign="middle" style="{{round}}; text-align: center; width: 98%; background-color:#{{Mw color}}; border: 1px solid #{{Mw color light}}" {{!}}<div style="{{round}}; 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: 2px solid #{{Mw color light}}; ">
{{#ifexpr: {{#var:TabCount}} > 6|
<table style="position: relative; " align="center" cellpadding="0" cellspacing="0" width=100%>
{{#var:UpperTabs}}
{{#var:TabA}}
</table>
}}
{| style="{{round}}; position: relative; " align="center" cellpadding="0" cellspacing="0" width=100%
{{#var:LowerTabs}}
|} </div>
<div style="{{round}}; position: relative; font-size: 90%; padding-top: 3px; padding-left: 10px; padding-right: 10px; background: none; border: 2px solid #{{Mw color light}}; border-top:0px; {{#if:{{{height|}}}|height:{{{height|}}};}}">
<div class="tabcontent">
{{#ifeq:{{{default|1}}}
  |1
  |{{toggle|{{{content1|}}}||{{#var:name}}1 {{#var:name}}s}}
  |{{toggle||{{{content1|}}}|{{#var:name}}1 {{#var:name}}s}}
}}
{{#ifeq:{{{default}}}
  |2
  |{{toggle|{{{content2|}}}||{{#var:name}}2 {{#var:name}}s}}
  |{{toggle||{{{content2|}}}|{{#var:name}}2 {{#var:name}}s}}
}}
{{#ifeq:{{{default}}}
  |3
  |{{toggle|{{{content3|}}}||{{#var:name}}3 {{#var:name}}s}}
  |{{toggle||{{{content3|}}}|{{#var:name}}3 {{#var:name}}s}}
}}
{{#ifeq:{{{default}}}
  |4
  |{{toggle|{{{content4|}}}||{{#var:name}}4 {{#var:name}}s}}
  |{{toggle||{{{content4|}}}|{{#var:name}}4 {{#var:name}}s}}
}}
{{#ifeq:{{{default}}}
  |5
  |{{toggle|{{{content5|}}}||{{#var:name}}5 {{#var:name}}s}}
  |{{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>


==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, much easier to navigate, and more aesthetically pleasing.  


==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 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, start with this layout:
 
To use this template, begin with this layout:
 
<pre>
<pre>
{{Tab
{{Tab
|name    =
|header  =
|header  =
|width    =
|height  =
|height  =
|default  =
|default  =
Line 216: Line 80:
}}
}}
</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 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.)''
'''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.)''
'''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.)''
Line 228: Line 89:
'''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. 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.)''


'''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 height parameter to make the whole template look its best. ''(Required.)''


==Examples==
==Examples==
To see examples of using this template, see the templates:
To see examples of this template in use, see the templates:
 
{{t|Space Pirates-nav}}, {{t|Planet-nav}}, {{t|MP1 Rooms-nav}}. More examples can be found in the [[:Category:Navigation Templates|Navigation Templates]] category.
 
==Origins==
This template [[zeldawiki:Template:Tab|originated]] from [[zeldawiki:Main Page|Zelda Wiki]].


[[Category:Formatting Templates]]
[[Category:Formatting Templates]]
</noinclude>
</noinclude>

Latest revision as of 22:33, 31 January 2024


Purpose[edit source]

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[edit source]

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[edit source]

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[edit source]

This template originated from Zelda Wiki.