Template:Custom Tabs/doc: Difference between revisions
Created page with "{{Documentation/Header}} {{CSS|CustomTabs}} Template for creating tabs for navigation. ==Parameters== <pre> {{Custom Tabs |rootpage = |namespace = |subpages = |tab1 = |tab2 = |tab2name = |tab3 = |tab3name = |tab4 = |tab4name = |tab5 = |tab5name = |tab6 = |tab6name = |tab7 = |tab7name = |tab8 = |tab8name = |tab9 = |tab9name = |tab10 = |tab10name = |tab11 = |tab11name = |tab12 = |ta..." |
mNo edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Documentation/Header}} | {{Documentation/Header}} | ||
{{High Risk|pagetype=Main}} | |||
{{CSS|CustomTabs}} | {{CSS|CustomTabs}} | ||
Template for creating tabs for navigation. | Template for creating tabs for navigation. | ||
== | ==Syntax== | ||
{{T|Custom Tabs | |||
{{Custom Tabs | |p1 =rootpage = | ||
|rootpage = | |p2 =namespace = | ||
|namespace = | |p3 =subpages = | ||
|subpages = | |p4 =tab1 = | ||
|tab1 = | |p5 =tab2 = | ||
|tab2 = | |p6 =tab3 = | ||
| | |p7 =tab4 = | ||
|p8 =tab5 = | |||
| | |p9 =tab6 = | ||
|p10=tab7 = | |||
| | |p11=tab8 = | ||
|p12=tab9 = | |||
| | |block=1}} | ||
*{{F|rootpage}} — title of root page if not using current page's root. | |||
| | *{{F|namespace}} — name of namespace if not using current page's namespace. Use empty parameter for main namespace. | ||
*{{F|subpages}} — tabs are subpages of the first if set to 1, otherwise are notm. Default {{F|1}}. | |||
| | *{{F|tab1}} — title of first tab. | ||
*{{F|tab2}}, {{F|tab3}}, {{F|tab4}}, {{F|tab5}}, {{F|tab6}}, {{F|tab7}}, {{F|tab8}}, {{F|tab9}} — title of subpage tabs. | |||
| | |||
| | |||
}} | |||
* {{F|rootpage}} | |||
* {{F|namespace}} | |||
* {{F|subpages}} | |||
* {{F|tab1}} | |||
* {{F| | |||
==Examples== | ==Examples== | ||
{{T|Custom Tabs|block=1| | {{T|Custom Tabs|block=1|_Yn_=1 | ||
|p1 = tab1 = Overview | |p1=tab1 = Overview | ||
| | |p2=tab2 = Story | ||
| | |p3=tab3 = Voicelines | ||
|p4 = tab4 = | |p4=tab4 = Media | ||
}} | |||
{{T|Custom Tabs|block=1|_Yn_=1 | |||
|p1=rootpage = Nanafey | |||
|p2=namespace = | |||
|p3=class = custom-tabs-secondary | |||
|p4=tab1 = Overview | |||
|p5=tab2 = Story | |||
|p6=tab3 = Combat | |||
|p7=tab4 = Voicelines | |||
|p8=tab5 = Anima | |||
}} | |||
{{T|Custom Tabs|block=1|_Yn_=1 | |||
|p1=namespace = | |||
|p2=subpages = 0 | |||
|p3=class = custom-tabs-tertiary | |||
|p4=tab1 = Taileep | |||
|p5=tab1name = First Tab | |||
|p6=tab2 = Puddlipup | |||
|p7=tab2name = Second Tab | |||
|p8=tab3 = Vulberry | |||
|p9=tab3name = Third Tab | |||
|p10=tab4 = Foalhardy | |||
|p11=tab4name = Forth Tab | |||
}} | }} | ||
==Template Data== | |||
<templatedata> | |||
{ | |||
"params": { | |||
"tab1": {}, | |||
"rootpage": { | |||
"description": "Title of the root page to base the tab's subpages on, if not using the actual root page name (content before only the first /)", | |||
"example": "Furnishing/List", | |||
"type": "wiki-page-name" | |||
}, | |||
"namespace": {}, | |||
"subpages": { | |||
"description": "Set to 0 if tabs are not subpages of the first page.", | |||
"type": "boolean", | |||
"default": "1" | |||
}, | |||
"tab1name": {}, | |||
"tab2": {}, | |||
"tab2name": {}, | |||
"tab3": {}, | |||
"tab3name": {}, | |||
"tab4": {}, | |||
"tab4name": {}, | |||
"tab5": {}, | |||
"tab5name": {}, | |||
"tab6": {}, | |||
"tab6name": {}, | |||
"tab7": {}, | |||
"tab7name": {}, | |||
"tab8": {}, | |||
"tab8name": {}, | |||
"tab9": {}, | |||
"tab9name": {}, | |||
"tab10": {}, | |||
"tab10name": {}, | |||
"tab11": {}, | |||
"tab11name": {}, | |||
"tab12": {}, | |||
"tab12name": {}, | |||
"tab13": {}, | |||
"tab13name": {}, | |||
"class": { | |||
"description": "Assign a different class to differentiate between multiple sets of tabs on the same page.", | |||
"example": "custom-tabs-secondary", | |||
"type": "string", | |||
"default": "custom-tabs-default" | |||
} | |||
}, | |||
"format": "{{_\n|_ = _\n}}\n", | |||
"paramOrder": [ | |||
"rootpage", | |||
"namespace", | |||
"subpages", | |||
"class", | |||
"tab1", | |||
"tab1name", | |||
"tab2", | |||
"tab2name", | |||
"tab3", | |||
"tab3name", | |||
"tab4", | |||
"tab4name", | |||
"tab5", | |||
"tab5name", | |||
"tab6", | |||
"tab6name", | |||
"tab7", | |||
"tab7name", | |||
"tab8", | |||
"tab8name", | |||
"tab9", | |||
"tab9name", | |||
"tab10", | |||
"tab10name", | |||
"tab11", | |||
"tab11name", | |||
"tab12", | |||
"tab12name", | |||
"tab13", | |||
"tab13name" | |||
], | |||
"description": "Template for creating tabs for navigation." | |||
} | |||
</templatedata><noinclude> | |||
<!-- Interwiki links here --> | |||
</noinclude> | |||
Latest revision as of 06:30, 2 September 2025
This is the documentation page for Custom Tabs. It contains usage information, categories, and other content not part of the original template page. | ||
|---|---|---|
| Main | Documentation | Usage |
Template for creating tabs for navigation.
Syntax
{{Custom Tabs
|rootpage =
|namespace =
|subpages =
|tab1 =
|tab2 =
|tab3 =
|tab4 =
|tab5 =
|tab6 =
|tab7 =
|tab8 =
|tab9 =
}}
- rootpage — title of root page if not using current page's root.
- namespace — name of namespace if not using current page's namespace. Use empty parameter for main namespace.
- subpages — tabs are subpages of the first if set to 1, otherwise are notm. Default 1.
- tab1 — title of first tab.
- tab2, tab3, tab4, tab5, tab6, tab7, tab8, tab9 — title of subpage tabs.
Examples
{{Custom Tabs
|tab1 = Overview
|tab2 = Story
|tab3 = Voicelines
|tab4 = Media
}}
yields:
{{Custom Tabs
|rootpage = Nanafey
|namespace =
|class = custom-tabs-secondary
|tab1 = Overview
|tab2 = Story
|tab3 = Combat
|tab4 = Voicelines
|tab5 = Anima
}}
yields:
{{Custom Tabs
|namespace =
|subpages = 0
|class = custom-tabs-tertiary
|tab1 = Taileep
|tab1name = First Tab
|tab2 = Puddlipup
|tab2name = Second Tab
|tab3 = Vulberry
|tab3name = Third Tab
|tab4 = Foalhardy
|tab4name = Forth Tab
}}
yields:
Template Data
Template for creating tabs for navigation.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| rootpage | rootpage | Title of the root page to base the tab's subpages on, if not using the actual root page name (content before only the first /)
| Page name | optional |
| namespace | namespace | no description | Unknown | optional |
| subpages | subpages | Set to 0 if tabs are not subpages of the first page.
| Boolean | optional |
| class | class | Assign a different class to differentiate between multiple sets of tabs on the same page.
| String | optional |
| tab1 | tab1 | no description | Unknown | optional |
| tab1name | tab1name | no description | Unknown | optional |
| tab2 | tab2 | no description | Unknown | optional |
| tab2name | tab2name | no description | Unknown | optional |
| tab3 | tab3 | no description | Unknown | optional |
| tab3name | tab3name | no description | Unknown | optional |
| tab4 | tab4 | no description | Unknown | optional |
| tab4name | tab4name | no description | Unknown | optional |
| tab5 | tab5 | no description | Unknown | optional |
| tab5name | tab5name | no description | Unknown | optional |
| tab6 | tab6 | no description | Unknown | optional |
| tab6name | tab6name | no description | Unknown | optional |
| tab7 | tab7 | no description | Unknown | optional |
| tab7name | tab7name | no description | Unknown | optional |
| tab8 | tab8 | no description | Unknown | optional |
| tab8name | tab8name | no description | Unknown | optional |
| tab9 | tab9 | no description | Unknown | optional |
| tab9name | tab9name | no description | Unknown | optional |
| tab10 | tab10 | no description | Unknown | optional |
| tab10name | tab10name | no description | Unknown | optional |
| tab11 | tab11 | no description | Unknown | optional |
| tab11name | tab11name | no description | Unknown | optional |
| tab12 | tab12 | no description | Unknown | optional |
| tab12name | tab12name | no description | Unknown | optional |
| tab13 | tab13 | no description | Unknown | optional |
| tab13name | tab13name | no description | Unknown | optional |