Template:Tabs/Documentation

From Zelda Dungeon Wiki
< Template:Tabs
Revision as of 23:59, June 26, 2020 by Locke (talk | contribs) (Created page with "Creates a box with content that changes when different tabs are selected. ==Usage== <!-- not using {{Usage/Block}} here because I want some particular formatting --> <pre st...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.

Creates a box with content that changes when different tabs are selected.

Usage

{{Tabs
| activation = 
| width = 
| height = 
|
| left_activation = 
| left_default = 
| left_width = 
| left_1 = 
| left_1_label = 
| ...
|
| top_activation = 
| top_selector = 
| top_default = 
| top_1 = 
| top_1_label = 
| ...
|
| content_default = 
| content_key1 = 
| content_key1_width = 
| ...
}}
  • activation — Mouse event that triggers activation of a tab. (Optional. Default: click)
  • width — Overall width in px of the tabs box. (Optional.)
  • height — Overall height in px of the tabs box. (Optional.)
  • left_activation — Mouse event that triggers activation of a left-side tab. (Optional. Default: same as activation)
  • left_default — Index of the tab to be selected by default on the left side. Enter 0 to leave tabs unselected. (Optional. Default: 1)
  • left_width — Width in px of the left set of tabs (Optional. Default: 60)
  • left_n — ID of the nth tab on the left
  • left_n_label — Label for the nth tab on the left (Optional. Default: same as left_n tab ID)
  • top_activation — Mouse event that triggers activation of a top tab. (Optional. Default: same as activation)
  • top_default — Index of the tab to be selected by default on the top. Enter 0 to leave tabs unselected. (Optional. Default: 1)
  • top_n — ID of the nth tab on the top
  • t_n_label — Label for the nth tab on the top (Optional. Default: same as top_n tab ID)
  • content_default — Content to show by default if no tabs are selected or javascript isn't loaded. (Optional.)
  • content_key — Content to show when tab ID key is selected. If there are both left and top tabs, key is the left tab ID and then the top tab ID separated by a space.
  • content_key_width — Width of the content given by key. (Optional.)

Examples

ExampleResult
{{Tabs
| top_1 = First
| top_2 = Second
| top_3 = The Third
|
| content_First = First content.
| content_Second = Second content.
| content_TheThird = The Third content.
}}
  • First
  • Second
  • The Third
The Third content.
First content.
Second content.
ExampleResult
{{Tabs
| left_1 = A
| left_2 = B
| left_3 = C
|
| top_1 = 1
| top_2 = 2
| top_3 = 3
|
| content_A 1 = A 1 content.
| content_A 2 = A 2 content.
| content_A 3 = A 3 content.
| content_B 1 = B 1 content.
| content_B 2 = B 2 content.
| content_B 3 = B 3 content.
| content_C 1 = C 1 content.
| content_C 2 = C 2 content.
| content_C 3 = C 3 content.
}}
  • A
  • B
  • C
  • 1
  • 2
  • 3
A 1 content.
B 1 content.
A 3 content.
B 3 content.
C 2 content.
B 2 content.
A 2 content.
C 3 content.
C 1 content.