This is a mirror host of the KP Official Wiki on Miraheze. We dont actually mirror we host the same content

Template:TabbedHeader: Difference between revisions

From Kaiju Paradise Official Wiki
mNo edit summary
No edit summary
 
Line 3: Line 3:
-->{{#if:{{{tab2|}}}|<td class="{{#ifeq:{{SUBPAGENAME}}|{{{tab2}}}|active-tab|{{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}|{{{tab2}}}|active-tab|inactive-tab}}}}"><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab2}}}|{{{tab2name|{{{tab2}}}}}}]]</div></td>}}<!--
-->{{#if:{{{tab2|}}}|<td class="{{#ifeq:{{SUBPAGENAME}}|{{{tab2}}}|active-tab|{{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}|{{{tab2}}}|active-tab|inactive-tab}}}}"><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab2}}}|{{{tab2name|{{{tab2}}}}}}]]</div></td>}}<!--
-->{{#if:{{{tab3|}}}|<td class="{{#ifeq:{{SUBPAGENAME}}|{{{tab3}}}|active-tab|{{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}|{{{tab3}}}|active-tab|inactive-tab}}}}"><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab3}}}|{{{tab3name|{{{tab3}}}}}}]]</div></td>}}<!--
-->{{#if:{{{tab3|}}}|<td class="{{#ifeq:{{SUBPAGENAME}}|{{{tab3}}}|active-tab|{{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}|{{{tab3}}}|active-tab|inactive-tab}}}}"><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab3}}}|{{{tab3name|{{{tab3}}}}}}]]</div></td>}}<!--
-->{{#if:{{{tab4|}}}|<td class="{{#ifeq:{{SUBPAGENAME}}|{{{tab4}}}|active-tab|{{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}|{{{tab4}}}|active-tab|inactive-tab}}}}"><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab4}}}|{{{tab4name|{{{tab4}}}}}}]]</div></td>}}</tr></table></includeonly>
-->{{#if:{{{tab4|}}}|<td class="{{#ifeq:{{SUBPAGENAME}}|{{{tab4}}}|active-tab|{{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}|{{{tab4}}}|active-tab|inactive-tab}}}}"><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab4}}}|{{{tab4name|{{{tab4}}}}}}]]</div></td>}}<!--
-->{{#if:{{{tab5|}}}|<td class="{{#ifeq:{{SUBPAGENAME}}|{{{tab5}}}|active-tab|{{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}|{{{tab5}}}|active-tab|inactive-tab}}}}"><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab5}}}|{{{tab5name|{{{tab5}}}}}}]]</div></td>}}</tr></table></includeonly>
<noinclude>{{Documentation}}</noinclude>
<noinclude>{{Documentation}}</noinclude>

Latest revision as of 15:55, 13 June 2024


File:Template-info.svg
Template Documentation follows
[view | edit | history | purge]

Usage

This will create header tabs stylized to fit the wiki theme.

Parameters

{{TabbedHeader
|rootpage = 
|namespace = 
|subpages = 
|tab1 = 
|tab2 = 
|tab3 = 
|tab4 = 
}}

Fields

Field Accepted Values Example Notes
rootpage a page name - OPTIONAL. Use if the root page is different than the one this template is being inserted into.
namespace a namespace Template - Use if the namespace is different than the one this template is being inserted into. Otherwise, leave empty (defaults to main namespace).
subpages default:1/else 1 - OPTIONAL. Default set to 1, which will display any following tabs to be the subpages of tab1. Use/change this field if your headers are being used to link to various independant pages.
tab1 Page Name - Required. By default, what is set in this page will dictate the content/links of subsequent tabs.
tab2~4 Subpage Name - Required. By default, content here will be the subpages of tab1.

Examples

{{TabbedHeader
|rootpage = Kaiju
|namespace = 
|subpages = 2
|tab1 = Kaiju
|tab2 = Trivia
|tab3 = Gallery
|tab4 = 
}}
The above documentation is transcluded from Template:TabbedHeader/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) page.
Add categories and interwikis to the /doc subpage. Subpages of this template.