Difference between revisions of "Template:Start tab/doc"
Jump to navigation
Jump to search
m (7 revisions imported) |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<!-- Categories and interwikis go at the bottom of this page. --> | <!-- Categories and interwikis go at the bottom of this page. --> | ||
− | {{tl|start tab}} can be used to create a tabbed interface for usage on | + | {{tl|start tab}} can be used to create a tabbed interface for usage on documentation, user pages, etc. |
== Usage == | == Usage == | ||
Line 8: | Line 8: | ||
<pre> | <pre> | ||
{{ start tab | {{ start tab | ||
− | | link-1 = | + | | link-1 = project |
− | | tab-1 = | + | | tab-1 = project |
− | | link-2 = | + | | link-2 = project |
− | | tab-2 = | + | | tab-2 = project |
− | | link-3 = | + | | link-3 = project |
− | | tab-3 = | + | | tab-3 = project |
− | | link-4 = | + | | link-4 = project |
− | | tab-4 = | + | | tab-4 = project |
− | | link-5 = | + | | link-5 = project |
− | | tab-5 = | + | | tab-5 = project |
}} | }} | ||
</pre> | </pre> | ||
Line 44: | Line 44: | ||
| tab-1 = Current page | | tab-1 = Current page | ||
| link-1 = Template:Start tab | | link-1 = Template:Start tab | ||
− | | tab-2 = | + | | tab-2 = Projects |
| link-2 = Wikipedia:WikiProject Athletics | | link-2 = Wikipedia:WikiProject Athletics | ||
| tab-3 = Project talk | | tab-3 = Project talk | ||
Line 57: | Line 57: | ||
| tab-1 = Current page | | tab-1 = Current page | ||
| link-1 = Template:Start tab | | link-1 = Template:Start tab | ||
− | | tab-2 = | + | | tab-2 = Projects |
| link-2 = Wikipedia:WikiProject Athletics | | link-2 = Wikipedia:WikiProject Athletics | ||
| tab-3 = Project talk | | tab-3 = Project talk | ||
Line 169: | Line 169: | ||
<includeonly> | <includeonly> | ||
<!-- Categories and interwikis go here: --> | <!-- Categories and interwikis go here: --> | ||
− | |||
[[Category:Formatting templates]] | [[Category:Formatting templates]] | ||
</includeonly> | </includeonly> |
Latest revision as of 20:36, 30 October 2020
Script error: No such module "Template translation".
{{start tab}} can be used to create a tabbed interface for usage on documentation, user pages, etc.
Usage
{{ start tab | link-1 = project | tab-1 = project | link-2 = project | tab-2 = project | link-3 = project | tab-3 = project | link-4 = project | tab-4 = project | link-5 = project | tab-5 = project }}
Each tab needs a link
attribute with the title of the page it refers to, and a tab
attribute with a label for the tab. If the current page title matches a link
then that tab will be styled differently. The freeform
attribute can be used with any tab (for instance |freeform-2=yes
to allow for a freeform lable with multiple internal and external links if desires; otherwise, the text is tab
is used as a wikilink to the page specified by link
.
Parameters
- The maximum number of available tabs is 20.
- To use the next page feature, end the page with the {{end tab}} template.
- It is possible to define the following optional parameters:
frame=
: set toyes
to add a page frame underneath the tabs.border=
: border style.off tab color=
: color of the currently unselected tabs.on tab color=
: color of the currently selected tab.rounding=
: add rounding effect to edges of tab boxes.tab alignment=
: set alignment of tab's title (left/center/right).image-(N°)=
: name of optional image (set to 20 px) to place next to tab title.
Examples
Example for w:Wikipedia: WikiProject Athletics:
{{ start tab | tab-1 = Current page | link-1 = Template:Start tab | tab-2 = Projects | link-2 = Wikipedia:WikiProject Athletics | tab-3 = Project talk | link-3 = Wikipedia talk:WikiProject Athletics | tab-4 = Olympics Project | link-4 = Wikipedia: WikiProject Olympics }} Text on page here {{ end tab | tab-1 = Current page | link-1 = Template:Start tab | tab-2 = Projects | link-2 = Wikipedia:WikiProject Athletics | tab-3 = Project talk | link-3 = Wikipedia talk:WikiProject Athletics | tab-4 = Olympics Project | link-4 = Wikipedia: WikiProject Olympics }}
Current page | Project | Project talk | Olympics Project |
Text on page here
Example for w:Wikipedia: WikiProject Athletics:
{{ start tab | tab-1 = Current page | link-1 = Template:Start tab | tab-2 = Project | link-2 = Wikipedia:WikiProject Athletics | tab-3 = Project talk | link-3 = Wikipedia talk:WikiProject Athletics | tab-4 = Olympics Project | link-4 = Wikipedia: WikiProject Olympics | border = 1px solid #808080 | off tab color = #f0f0ff | on tab color = | rounding = 5em | tab alignment = center }} Text on page here {{ end tab | tab-1 = Current page | link-1 = Template:Start tab | tab-2 = Project | link-2 = Wikipedia:WikiProject Athletics | tab-3 = Project talk | link-3 = Wikipedia talk:WikiProject Athletics | tab-4 = Olympics Project | link-4 = Wikipedia: WikiProject Olympics | border = 1px solid #808080 | off tab color = #f0f0ff | on tab color = | rounding = 5em | tab alignment = center }}
Current page | Project | Project talk | Olympics Project |
Text on page here
See also