Difference between revisions of "Template:ClickTabs"
Jump to navigation
Jump to search
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {| style="text-align: center | + | <includeonly>{| class="clicktabs" style="text-align: center; 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;" {{!}} | ||
− | {{#if:{{{tab2|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|2|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-2" {{!}} {{{tab2|}}} | + | {{#if:{{{tab2|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|2|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-2" {{!}} '''{{{tab2|}}}''' |
{{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | {{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | ||
− | {{#if:{{{tab3|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|3|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-3" {{!}} {{{tab3|}}} | + | {{#if:{{{tab3|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|3|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-3" {{!}} '''{{{tab3|}}}''' |
{{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | {{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | ||
− | {{#if:{{{tab4|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|4|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-4" {{!}} {{{tab4|}}} | + | {{#if:{{{tab4|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|4|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-4" {{!}} '''{{{tab4|}}}''' |
{{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | {{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | ||
− | {{#if:{{{tab5|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|5|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-5" {{!}} {{{tab5|}}} | + | {{#if:{{{tab5|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|5|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-5" {{!}} '''{{{tab5|}}}''' |
{{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | {{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | ||
− | {{#if:{{{tab6|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|6|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-6" {{!}} {{{tab6|}}} | + | {{#if:{{{tab6|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|6|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-6" {{!}} '''{{{tab6|}}}''' |
{{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | {{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | ||
− | {{#if:{{{tab7|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|7|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-7" {{!}} {{{tab7|}}} | + | {{#if:{{{tab7|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|7|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-7" {{!}} '''{{{tab7|}}}''' |
{{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | {{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | ||
− | {{#if:{{{tab8|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|8|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-8" {{!}} {{{tab8|}}} | + | {{#if:{{{tab8|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|8|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-8" {{!}} '''{{{tab8|}}}''' |
{{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | {{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | ||
− | {{#if:{{{tab9|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|9|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-9" {{!}} {{{tab9|}}} | + | {{#if:{{{tab9|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|9|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-9" {{!}} '''{{{tab9|}}}''' |
{{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | {{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | ||
− | {{#if:{{{tab10|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|10|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-10" {{!}} {{{tab10|}}} | + | {{#if:{{{tab10|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|10|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-10" {{!}} '''{{{tab10|}}}''' |
{{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | {{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | ||
− | {{#if:{{{tab11|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|11|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-11" {{!}} {{{tab11|}}} | + | {{#if:{{{tab11|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|11|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-11" {{!}} '''{{{tab11|}}}''' |
{{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | {{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}} | ||
− | {{#if:{{{tab12|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|12|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-12" {{!}} {{{tab12|}}} | + | {{#if:{{{tab12|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|12|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-12" {{!}} '''{{{tab12|}}}''' |
{{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}}<!-- | {{!}} style="border-bottom:2px solid #aaa; width:3px;" {{!}}<!-- | ||
{{#if:{{{tab13|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|13|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-13" {{!}} {{{tab13|}}} | {{#if:{{{tab13|}}}|{{!}} class="clicktabs-tab {{#ifeq:{{{activetab|}}}|13|clicktabs-active|clicktabs-inactive}}" id="clicktabs-tab-13" {{!}} {{{tab13|}}} | ||
Line 44: | Line 44: | ||
{{#if:{{{content1|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-1" style="{{#ifeq:{{{activetab|}}}|1||{{#if:{{{activetab|}}}|display:none||}}}}" colspan=100 {{!}} {{{content1|}}} | {{#if:{{{content1|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-1" style="{{#ifeq:{{{activetab|}}}|1||{{#if:{{{activetab|}}}|display:none||}}}}" colspan=100 {{!}} {{{content1|}}} | ||
{{#if:{{{content2|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-2" style="{{#ifeq:{{{activetab|}}}|2||display:none}}" colspan=100 {{!}} {{{content2|}}} | {{#if:{{{content2|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-2" style="{{#ifeq:{{{activetab|}}}|2||display:none}}" colspan=100 {{!}} {{{content2|}}} | ||
− | {{#if:{{{content3|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-3" style="{{#ifeq:{{{activetab|}}}|3| | + | {{#if:{{{content3|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-3" style="{{#ifeq:{{{activetab|}}}|3||display:none}}" colspan=100 {{!}} {{{content3|}}} |
− | {{#if:{{{content4|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-4" style="{{#ifeq:{{{activetab|}}}|4|| | + | {{#if:{{{content4|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-4" style="{{#ifeq:{{{activetab|}}}|4||display:none}}" colspan=100 {{!}} {{{content4|}}} |
− | {{#if:{{{content5|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-5" style="{{#ifeq:{{{activetab|}}}|5| | + | {{#if:{{{content5|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-5" style="{{#ifeq:{{{activetab|}}}|5||display:none}}" colspan=100 {{!}} {{{content5|}}} |
− | {{#if:{{{content6|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-6" style="{{#ifeq:{{{activetab|}}}|6|| | + | {{#if:{{{content6|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-6" style="{{#ifeq:{{{activetab|}}}|6||display:none}}" colspan=100 {{!}} {{{content6|}}} |
− | {{#if:{{{content7|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-7" style="{{#ifeq:{{{activetab|}}}|7| | + | {{#if:{{{content7|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-7" style="{{#ifeq:{{{activetab|}}}|7||display:none}}" colspan=100 {{!}} {{{content7|}}} |
− | {{#if:{{{content8|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-8" style="{{#ifeq:{{{activetab|}}}|8|| | + | {{#if:{{{content8|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-8" style="{{#ifeq:{{{activetab|}}}|8||display:none}}" colspan=100 {{!}} {{{content8|}}} |
− | {{#if:{{{content9|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-9" style="{{#ifeq:{{{activetab|}}}|9| | + | {{#if:{{{content9|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-9" style="{{#ifeq:{{{activetab|}}}|9||display:none}}" colspan=100 {{!}} {{{content9|}}} |
− | {{#if:{{{content10|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-10" style="{{#ifeq:{{{activetab|}}}|10|| | + | {{#if:{{{content10|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-10" style="{{#ifeq:{{{activetab|}}}|10||display:none}}" colspan=100 {{!}} {{{content10|}}} |
− | {{#if:{{{content11|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-11" style="{{#ifeq:{{{activetab|}}}|11| | + | {{#if:{{{content11|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-11" style="{{#ifeq:{{{activetab|}}}|11||display:none}}" colspan=100 {{!}} {{{content11|}}} |
− | {{#if:{{{content12|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-12" style="{{#ifeq:{{{activetab|}}}|12|| | + | {{#if:{{{content12|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-12" style="{{#ifeq:{{{activetab|}}}|12||display:none}}" colspan=100 {{!}} {{{content12|}}}<!-- |
− | {{#if:{{{content13|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-13" style="{{#ifeq:{{{activetab|}}}|13| | + | {{#if:{{{content13|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-13" style="{{#ifeq:{{{activetab|}}}|13||display:none}}" colspan=100 {{!}} {{{content13|}}} |
− | {{#if:{{{content14|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-14" style="{{#ifeq:{{{activetab|}}}|14|| | + | {{#if:{{{content14|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-14" style="{{#ifeq:{{{activetab|}}}|14||display:none}}" colspan=100 {{!}} {{{content14|}}} |
− | {{#if:{{{content15|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-15" style="{{#ifeq:{{{activetab|}}}|15| | + | {{#if:{{{content15|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-15" style="{{#ifeq:{{{activetab|}}}|15||display:none}}" colspan=100 {{!}} {{{content15|}}} |
− | {{#if:{{{content16|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-16" style="{{#ifeq:{{{activetab|}}}|16|| | + | {{#if:{{{content16|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-16" style="{{#ifeq:{{{activetab|}}}|16||display:none}}" colspan=100 {{!}} {{{content16|}}} |
− | {{#if:{{{content17|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-17" style="{{#ifeq:{{{activetab|}}}|17| | + | {{#if:{{{content17|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-17" style="{{#ifeq:{{{activetab|}}}|17||display:none}}" colspan=100 {{!}} {{{content17|}}} |
− | {{#if:{{{content18|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-18" style="{{#ifeq:{{{activetab|}}}|18|| | + | {{#if:{{{content18|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-18" style="{{#ifeq:{{{activetab|}}}|18||display:none}}" colspan=100 {{!}} {{{content18|}}} |
− | {{#if:{{{content19|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-19" style="{{#ifeq:{{{activetab|}}}|19| | + | {{#if:{{{content19|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-19" style="{{#ifeq:{{{activetab|}}}|19||display:none}}" colspan=100 {{!}} {{{content19|}}} |
− | {{#if:{{{content20|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-20" style="{{#ifeq:{{{activetab|}}}|20| | + | {{#if:{{{content20|}}}|{{!}} class="clicktabs-content" id="clicktabs-content-20" style="{{#ifeq:{{{activetab|}}}|20||display:none}}" colspan=100 {{!}} {{{content20|}}}}}}}}}}}}}}}}}}}-->}}}}}}}}}}}}}}}}}}}}}}}} |
− | |} | + | |}</includeonly><noinclude>{{documentation}}[[Category:Templates]]</noinclude> |
Latest revision as of 07:19, 28 April 2021
(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. |
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. |