TabView – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Lou Montana moved page Template:Tabs to Template:TabView without leaving a redirect: Name standard) |
Lou Montana (talk | contribs) m (Fix examples) |
||
Line 19: | Line 19: | ||
|example1= <nowiki>{{Tabs}}</nowiki> | |example1= <nowiki>{{Tabs}}</nowiki> | ||
|result1= {{ {{FULLPAGENAME}} }} | |result1= {{ {{FULLPAGENAME}} }} | ||
|example2= <nowiki>{{ | |example2= <nowiki>{{TabView |title1= Tab 1 title}}</nowiki> | ||
|result2= {{ {{FULLPAGENAME}} |title1= Tab 1 title}} | |result2= {{ {{FULLPAGENAME}} |title1= Tab 1 title}} | ||
|example3= <nowiki>{{ | |example3= <nowiki>{{TabView |title1= Tab 1 title |content1= First tab content, yay!}}</nowiki> | ||
|result3= {{ {{FULLPAGENAME}} |title1= Tab 1 title |content1= First tab content, yay!}} | |result3= {{ {{FULLPAGENAME}} |title1= Tab 1 title |content1= First tab content, yay!}} | ||
|example4= <nowiki>{{Tabs |title1= Tab 1 title |title2= Tab 2 title}}</nowiki> | |example4= <nowiki>{{Tabs |title1= Tab 1 title |title2= Tab 2 title}}</nowiki> | ||
|result4= {{ {{FULLPAGENAME}} |title1= Tab 1 title |title2= Tab 2 title}} | |result4= {{ {{FULLPAGENAME}} |title1= Tab 1 title |title2= Tab 2 title}} | ||
|example5= <nowiki>{{ | |example5= <nowiki>{{TabView |title1= Tab 1 title |content1= First tab content... |title2= Tab 2 title |content2= Second tab content, yay!}}</nowiki> | ||
|result5= {{ {{FULLPAGENAME}} |title1= Tab 1 title |content1= First tab content... |title2= Tab 2 title |content2= Second tab content, yay!}} | |result5= {{ {{FULLPAGENAME}} |title1= Tab 1 title |content1= First tab content... |title2= Tab 2 title |content2= Second tab content, yay!}} | ||
|example6= <nowiki>{{ | |example6= <nowiki>{{TabView |selected= 2 |title1= Tab 1 title |content1= First tab content... |title2= Tab 2 title |content2= Second tab content, yay!}}</nowiki> | ||
|result6= {{ {{FULLPAGENAME}} |selected= 2 |title1= Tab 1 title |content1= First tab content... |title2= Tab 2 title |content2= Second tab content, yay!}} | |result6= {{ {{FULLPAGENAME}} |selected= 2 |title1= Tab 1 title |content1= First tab content... |title2= Tab 2 title |content2= Second tab content, yay!}} | ||
}}</noinclude> | }}</noinclude> |
Revision as of 05:04, 30 October 2021
This template allows for horizontal tabs.
This template is used on these pages.
Usage
{{TabView|title1..5|content1..5|selected}}
- title1..5: named parameter - tab #'s title
- content1..5: named parameter - tab #'s content
- selected: named parameter - selected tab (not 0-based index, e.g 1 = first tab, 2 = second etc)
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! |