TabView – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix examples)
(Add 6..10 support)
 
Line 4: Line 4:
}}{{#if:{{{title4|}}} | <div class="biki-tab-title">{{{title4|}}}</div>
}}{{#if:{{{title4|}}} | <div class="biki-tab-title">{{{title4|}}}</div>
}}{{#if:{{{title5|}}} | <div class="biki-tab-title">{{{title5|}}}</div>
}}{{#if:{{{title5|}}} | <div class="biki-tab-title">{{{title5|}}}</div>
}}{{#if:{{{title6|}}} | <div class="biki-tab-title">{{{title6|}}}</div>
}}{{#if:{{{title7|}}} | <div class="biki-tab-title">{{{title7|}}}</div>
}}{{#if:{{{title8|}}} | <div class="biki-tab-title">{{{title8|}}}</div>
}}{{#if:{{{title9|}}} | <div class="biki-tab-title">{{{title9|}}}</div>
}}{{#if:{{{title10|}}} | <div class="biki-tab-title">{{{title10|}}}</div>
}}{{#if:{{{content1|}}} | <div class="biki-tab-content">{{{content1|}}}</div>
}}{{#if:{{{content1|}}} | <div class="biki-tab-content">{{{content1|}}}</div>
}}{{#if:{{{content2|}}} | <div class="biki-tab-content">{{{content2|}}}</div>
}}{{#if:{{{content2|}}} | <div class="biki-tab-content">{{{content2|}}}</div>
Line 9: Line 14:
}}{{#if:{{{content4|}}} | <div class="biki-tab-content">{{{content4|}}}</div>
}}{{#if:{{{content4|}}} | <div class="biki-tab-content">{{{content4|}}}</div>
}}{{#if:{{{content5|}}} | <div class="biki-tab-content">{{{content5|}}}</div>
}}{{#if:{{{content5|}}} | <div class="biki-tab-content">{{{content5|}}}</div>
}}{{#if:{{{content6|}}} | <div class="biki-tab-content">{{{content6|}}}</div>
}}{{#if:{{{content7|}}} | <div class="biki-tab-content">{{{content7|}}}</div>
}}{{#if:{{{content8|}}} | <div class="biki-tab-content">{{{content8|}}}</div>
}}{{#if:{{{content9|}}} | <div class="biki-tab-content">{{{content9|}}}</div>
}}{{#if:{{{content10|}}} | <div class="biki-tab-content">{{{content10|}}}</div>
}}</div></includeonly><noinclude>{{Doc/Template
}}</div></includeonly><noinclude>{{Doc/Template
|descr= This template allows for ''horizontal'' tabs.
|descr= This template allows for ''horizontal'' tabs.
|param1= title1..5
|param1= title1..10
|descr1= named parameter - tab #'s title
|descr1= named parameter - tab #'s title
|param2= content1..5
|param2= content1..10
|descr2= named parameter - tab #'s content
|descr2= named parameter - tab #'s content
|param3= selected
|param3= selected

Latest revision as of 14:41, 16 November 2021

This template allows for horizontal tabs.

This template is used on these pages.

Usage

{{TabView|title1..10|content1..10|selected}}

  • title1..10: named parameter - tab #'s title
  • content1..10: named parameter - tab #'s content
  • selected: named parameter - selected tab (not 0-based index, e.g 1 = first tab, 2 = second etc)
Examples
Code Result
{{Tabs}}
{{TabView |title1= Tab 1 title}}
Tab 1 title
{{TabView |title1= Tab 1 title |content1= First tab content, yay!}}
Tab 1 title
First tab content, yay!
{{Tabs |title1= Tab 1 title |title2= Tab 2 title}}
Tab 1 title
Tab 2 title
{{TabView |title1= Tab 1 title |content1= First tab content... |title2= Tab 2 title |content2= Second tab content, yay!}}
Tab 1 title
Tab 2 title
First tab content...
Second tab content, yay!
{{TabView |selected= 2 |title1= Tab 1 title |content1= First tab content... |title2= Tab 2 title |content2= Second tab content, yay!}}
Tab 1 title
Tab 2 title
First tab content...
Second tab content, yay!