Difference between revisions of "Template:ClickTabs"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | {| style="text-align: center; width: 100%; border: 0; border-spacing: 0; border-collapse: collapse; vertical-align: top; margin:1em 0" | + | <includeonly>{| style="text-align: center; width: 100%; border: 0; border-spacing: 0; border-collapse: collapse; vertical-align: top; margin:1em 0" |
{{#if:{{{tab1|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|1|clicktabs-active|{{#if:{{{activetab|}}}|clicktabs-inactive|clicktabs-active}}}}" id="clicktabs-tab-1" {{!}} {{{tab1|}}} | {{#if:{{{tab1|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|1|clicktabs-active|{{#if:{{{activetab|}}}|clicktabs-inactive|clicktabs-active}}}}" id="clicktabs-tab-1" {{!}} {{{tab1|}}} | ||
{{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | {{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | ||
Line 62: | Line 62: | ||
{{#if:{{{content19|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-19" style="{{#ifeq:{{{activetab|}}}|19||{{#if:{{{activetab|}}}|display:none||}}}}" colspan=100 {{!}} {{{content19|}}} | {{#if:{{{content19|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-19" style="{{#ifeq:{{{activetab|}}}|19||{{#if:{{{activetab|}}}|display:none||}}}}" colspan=100 {{!}} {{{content19|}}} | ||
{{#if:{{{content20|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-20" style="{{#ifeq:{{{activetab|}}}|20||{{#if:{{{activetab|}}}|display:none||}}}}" colspan=100 {{!}} {{{content20|}}}}}}}}}}}}}}}}}}}-->}}}}}}}}}}}}}}}}}}}}}}}} | {{#if:{{{content20|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-20" style="{{#ifeq:{{{activetab|}}}|20||{{#if:{{{activetab|}}}|display:none||}}}}" colspan=100 {{!}} {{{content20|}}}}}}}}}}}}}}}}}}}-->}}}}}}}}}}}}}}}}}}}}}}}} | ||
− | |} | + | |}</includeonly><noinclude>{{documentation}}[[Category:Templates]]</noinclude> |
Revision as of 00:35, 18 April 2020
(view - edit) Documentation
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. Credit to Wikipedia for the styling.
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=Third Tab |content3=This is the content for the third tab. }}
Generates:
First Tab | Second Tab | Third Tab | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This is the content for the first tab. | This is the content for the third 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 second tab. It will be active by default. |tab3=Third Tab |content3=This is the content for the third tab. }}
Generates:
First Tab | Second Tab | Third Tab | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This is the content for the second tab. It will be active by default. |