Template:Start tab

From UBC Wiki
Documentation icon Template documentation[view] [edit] [history] [purge]


{{Start tab}} can be used to create a tabbed interface for usage on portals and projects, help pages and user pages.It can be used to organize a course page

Usage

{{Start tab
| freeform-n          =
| link-n              =
| link2-n             =
| link3-n             =
| link4-n             =
| link5-n             =
| tab-n               =
| frame               = 
| border              = 
| off tab color       = 
| on tab color        = 
| rounding            = 
| tab alignment       = 
| image-              = 
| tab font-size       = 
| nowrap              = 
| tab spacing percent = 
| preums              = 
}}

Parameters

freeform-n
Set freeform-n = yes to allow for arbitrary code in that tab's tab-n entry rather than just being plain text and a link. See below. When using the freeform attribute, the link attribute remains empty; for example:

<source lang="moin"> | freeform-1 = yes | tab-1 = The New York Times | link-1 = </source>

link-n
The tab link location, where "n" is number of the tab up to 20.
link2-n
The tab 2nd link location, where "n" is number of the tab up to 20. (only applies when using freeform-n)
link3-n
The tab 3rd link location, where "n" is number of the tab up to 20. (only applies when using freeform-n)
link4-n
The tab 4th link location, where "n" is number of the tab up to 20. (only applies when using freeform-n)
link5-n
The tab 5th link location, where "n" is number of the tab up to 20. (only applies when using freeform-n)
tab-n
The name of the tab, where "n" is number of the tab up to 20.
  • The maximum number of available tabs is 20.
  • To use the next page feature, end the page with the {{End tab}} template.

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 label with multiple internal and external links if desired; otherwise, the text in tab is used as a wikilink to the page specified by link.


Additional options:

frame
Set to yes to add a page frame underneath the tabs. This can be closed by adding </div></div> to the end of the page, or wherever else you want the frame to close.
frame color
Background color for frame. Default is on tab color.
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
Override alignment of tab's title (left/center/right).
image-(N°)
Name of optional image (set to 20px) to place next to tab title.
tab font-size
Override the font size of the text in the tab.
nowrap
Prevent long names from wrapping on each tab.
tab spacing percent
Override the width between the tabs.
preums
Internally used only on Template:Page tabs

Examples

Example for Wikipedia:WikiProject Athletics:

{{Start tab| frame = yes
| 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
}}

Text for main part of page goes here.

{{End tab| frame = yes
| 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
}}
 Current page Project Project talk Olympics Project 

Text for main part of page goes here.


Example for Wikipedia:WikiProject Athletics:

{{Start tab| frame = yes
| 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 for main part of page goes here.

{{End tab| frame = yes
| 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 for main part of page goes here.

See also

No description.

Template parameters

ParameterDescriptionTypeStatus
borderborder

no description

Unknownoptional
tab spacing percenttab spacing percent

no description

Unknownoptional
tab-1tab-1

no description

Unknownoptional
freeform-1freeform-1

no description

Unknownoptional
link-1link-1

no description

Unknownoptional
link2-1link2-1

no description

Unknownoptional
link3-1link3-1

no description

Unknownoptional
link4-1link4-1

no description

Unknownoptional
link5-1link5-1

no description

Unknownoptional
image-1image-1

no description

Unknownoptional
tab-2tab-2

no description

Unknownoptional
tab-3tab-3

no description

Unknownoptional
tab-4tab-4

no description

Unknownoptional
tab-5tab-5

no description

Unknownoptional
tab-6tab-6

no description

Unknownoptional
tab-7tab-7

no description

Unknownoptional
tab-8tab-8

no description

Unknownoptional
tab-9tab-9

no description

Unknownoptional
tab-10tab-10

no description

Unknownoptional
tab-11tab-11

no description

Unknownoptional
tab-12tab-12

no description

Unknownoptional
tab-13tab-13

no description

Unknownoptional
tab-14tab-14

no description

Unknownoptional
tab-15tab-15

no description

Unknownoptional
tab-16tab-16

no description

Unknownoptional
tab-17tab-17

no description

Unknownoptional
tab-18tab-18

no description

Unknownoptional
tab-19tab-19

no description

Unknownoptional
tab-20tab-20

no description

Unknownoptional
roundingrounding

no description

Unknownoptional
off tab color-1off tab color-1

no description

Unknownoptional
off tab coloroff tab color

no description

Unknownoptional
on tab coloron tab color

no description

Unknownoptional
tab font-sizetab font-size

no description

Unknownoptional
tab alignmenttab alignment

no description

Unknownoptional
nowrapnowrap

no description

Unknownoptional
freeform-2freeform-2

no description

Unknownoptional
link-2link-2

no description

Unknownoptional
link2-2link2-2

no description

Unknownoptional
link3-2link3-2

no description

Unknownoptional
link4-2link4-2

no description

Unknownoptional
link5-2link5-2

no description

Unknownoptional
image-2image-2

no description

Unknownoptional
off tab color-2off tab color-2

no description

Unknownoptional
freeform-3freeform-3

no description

Unknownoptional
link-3link-3

no description

Unknownoptional
link2-3link2-3

no description

Unknownoptional
link3-3link3-3

no description

Unknownoptional
link4-3link4-3

no description

Unknownoptional
link5-3link5-3

no description

Unknownoptional
image-3image-3

no description

Unknownoptional
off tab color-3off tab color-3

no description

Unknownoptional
freeform-4freeform-4

no description

Unknownoptional
link-4link-4

no description

Unknownoptional
link2-4link2-4

no description

Unknownoptional
link3-4link3-4

no description

Unknownoptional
link4-4link4-4

no description

Unknownoptional
link5-4link5-4

no description

Unknownoptional
image-4image-4

no description

Unknownoptional
off tab color-4off tab color-4

no description

Unknownoptional
freeform-5freeform-5

no description

Unknownoptional
link-5link-5

no description

Unknownoptional
link2-5link2-5

no description

Unknownoptional
link3-5link3-5

no description

Unknownoptional
link4-5link4-5

no description

Unknownoptional
link5-5link5-5

no description

Unknownoptional
image-5image-5

no description

Unknownoptional
off tab color-5off tab color-5

no description

Unknownoptional
freeform-6freeform-6

no description

Unknownoptional
link-6link-6

no description

Unknownoptional
link2-6link2-6

no description

Unknownoptional
link3-6link3-6

no description

Unknownoptional
link4-6link4-6

no description

Unknownoptional
link5-6link5-6

no description

Unknownoptional
image-6image-6

no description

Unknownoptional
off tab color-6off tab color-6

no description

Unknownoptional
freeform-7freeform-7

no description

Unknownoptional
link-7link-7

no description

Unknownoptional
link2-7link2-7

no description

Unknownoptional
link3-7link3-7

no description

Unknownoptional
link4-7link4-7

no description

Unknownoptional
link5-7link5-7

no description

Unknownoptional
image-7image-7

no description

Unknownoptional
off tab color-7off tab color-7

no description

Unknownoptional
freeform-8freeform-8

no description

Unknownoptional
link-8link-8

no description

Unknownoptional
link2-8link2-8

no description

Unknownoptional
link3-8link3-8

no description

Unknownoptional
link4-8link4-8

no description

Unknownoptional
link5-8link5-8

no description

Unknownoptional
image-8image-8

no description

Unknownoptional
off tab color-8off tab color-8

no description

Unknownoptional
freeform-9freeform-9

no description

Unknownoptional
link-9link-9

no description

Unknownoptional
link2-9link2-9

no description

Unknownoptional
link3-9link3-9

no description

Unknownoptional
link4-9link4-9

no description

Unknownoptional
link5-9link5-9

no description

Unknownoptional
image-9image-9

no description

Unknownoptional
off tab color-9off tab color-9

no description

Unknownoptional
freeform-10freeform-10

no description

Unknownoptional
link-10link-10

no description

Unknownoptional
link2-10link2-10

no description

Unknownoptional
link3-10link3-10

no description

Unknownoptional
link4-10link4-10

no description

Unknownoptional
link5-10link5-10

no description

Unknownoptional
image-10image-10

no description

Unknownoptional
off tab color-10off tab color-10

no description

Unknownoptional
freeform-11freeform-11

no description

Unknownoptional
link-11link-11

no description

Unknownoptional
link2-11link2-11

no description

Unknownoptional
link3-11link3-11

no description

Unknownoptional
link4-11link4-11

no description

Unknownoptional
link5-11link5-11

no description

Unknownoptional
image-11image-11

no description

Unknownoptional
freeform-12freeform-12

no description

Unknownoptional
link-12link-12

no description

Unknownoptional
link2-12link2-12

no description

Unknownoptional
link3-12link3-12

no description

Unknownoptional
link4-12link4-12

no description

Unknownoptional
link5-12link5-12

no description

Unknownoptional
image-12image-12

no description

Unknownoptional
freeform-13freeform-13

no description

Unknownoptional
link-13link-13

no description

Unknownoptional
link2-13link2-13

no description

Unknownoptional
link3-13link3-13

no description

Unknownoptional
link4-13link4-13

no description

Unknownoptional
link5-13link5-13

no description

Unknownoptional
image-13image-13

no description

Unknownoptional
freeform-14freeform-14

no description

Unknownoptional
link-14link-14

no description

Unknownoptional
link2-14link2-14

no description

Unknownoptional
link3-14link3-14

no description

Unknownoptional
link4-14link4-14

no description

Unknownoptional
link5-14link5-14

no description

Unknownoptional
image-14image-14

no description

Unknownoptional
freeform-15freeform-15

no description

Unknownoptional
link-15link-15

no description

Unknownoptional
link2-15link2-15

no description

Unknownoptional
link3-15link3-15

no description

Unknownoptional
link4-15link4-15

no description

Unknownoptional
link5-15link5-15

no description

Unknownoptional
image-15image-15

no description

Unknownoptional
freeform-16freeform-16

no description

Unknownoptional
link-16link-16

no description

Unknownoptional
link2-16link2-16

no description

Unknownoptional
link3-16link3-16

no description

Unknownoptional
link4-16link4-16

no description

Unknownoptional
link5-16link5-16

no description

Unknownoptional
image-16image-16

no description

Unknownoptional
freeform-17freeform-17

no description

Unknownoptional
link-17link-17

no description

Unknownoptional
link2-17link2-17

no description

Unknownoptional
link3-17link3-17

no description

Unknownoptional
link4-17link4-17

no description

Unknownoptional
link5-17link5-17

no description

Unknownoptional
image-17image-17

no description

Unknownoptional
freeform-18freeform-18

no description

Unknownoptional
link-18link-18

no description

Unknownoptional
link2-18link2-18

no description

Unknownoptional
link3-18link3-18

no description

Unknownoptional
link4-18link4-18

no description

Unknownoptional
link5-18link5-18

no description

Unknownoptional
image-18image-18

no description

Unknownoptional
freeform-19freeform-19

no description

Unknownoptional
link-19link-19

no description

Unknownoptional
link2-19link2-19

no description

Unknownoptional
link3-19link3-19

no description

Unknownoptional
link4-19link4-19

no description

Unknownoptional
link5-19link5-19

no description

Unknownoptional
image-19image-19

no description

Unknownoptional
freeform-20freeform-20

no description

Unknownoptional
link-20link-20

no description

Unknownoptional
link2-20link2-20

no description

Unknownoptional
link3-20link3-20

no description

Unknownoptional
link4-20link4-20

no description

Unknownoptional
link5-20link5-20

no description

Unknownoptional
image-20image-20

no description

Unknownoptional
frameframe

no description

Unknownoptional
frame colorframe color

no description

Unknownoptional