Template:ClickTabs/doc: Difference between revisions

From comp.tf
Jump to navigation Jump to search
No edit summary
No edit summary
Line 26: Line 26:
|tab3=Third Tab
|tab3=Third Tab
|content3=This is the content for the third tab
|content3=This is the content for the third tab
}}
=== Optional parameters ===
Additionally, the <code>|activetab=</code> parameter may be used to manually set which slide will show. The template will always default to the first tab if this parameter is not set.
<pre>{{ClickTabs
|activetab=2
|tab1=First Tab
|content1=This is the content for the first tab
|tab2=Active Tab
|content2=This is the content for the active tab
|tab3=ThirdTab
|content3=This is the content for the thirdtab
}}</pre>
Generates:
{{ClickTabs
|activetab=2
|tab1=First Tab
|content1=This is the content for the first tab
|tab2=Active Tab
|content2=This is the content for the active tab
|tab3=ThirdTab
|content3=This is the content for the thirdtab
}}
}}

Revision as of 00:44, 18 April 2020

Template:ClickTabs generates a series of tabs and content slides designed to show lots of content in a small space and on a single page.

The template currently supports up to 12 tabs and 12 content slides, but can easily be expanded if later needed.

Usage

{{ClickTabs
|tab1=First Tab
|content1=This is the content for the first tab

|tab2=Second Tab
|content2=This is the content for the second tab

|tab3=ThirdTab
|content3=This is the content for the thirdtab
}}

Generates:

First Tab Second Tab Third Tab
This is the content for the first tab

Optional parameters

Additionally, the |activetab= parameter may be used to manually set which slide will show. The template will always default to the first tab if this parameter is not set.

{{ClickTabs
|activetab=2

|tab1=First Tab
|content1=This is the content for the first tab

|tab2=Active Tab
|content2=This is the content for the active tab

|tab3=ThirdTab
|content3=This is the content for the thirdtab
}}

Generates:

First Tab Active Tab ThirdTab
This is the content for the active tab