Template:Tab: Difference between revisions
From WikiMSK
(Created page with "<includeonly>{{#if:{{{preums|}}}||<td style="width: {{#if:{{{tab spacing percent|}}}|{{{tab spacing percent}}}|2}}%; border-bottom: {{#if:{{{border|}}}|{{{border}}}|solid 1px...") |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{{#if:{{{preums|}}}||<td style="width: {{#if:{{{tab spacing percent|}}}|{{{tab spacing percent}}}|2}}%; border-bottom: {{#if:{{{border|}}}|{{{border}}}|solid 1px #a3b1bf}}">{{#if:{{{tab spacing percent|}}}|| }}</td>}}<td style="text-align: {{#if:{{{tab alignment|}}}|{{{tab alignment}}}|center}}; {{#if:{{{rounding|}}}| | <includeonly>{{#if:{{{preums|}}}||<td style="width: {{#if:{{{tab spacing percent|}}}|{{{tab spacing percent}}}|2}}%; border-bottom: {{#if:{{{border|}}}|{{{border}}}|solid 1px #a3b1bf}}">{{#if:{{{tab spacing percent|}}}|| }}</td>}}<td style="text-align: {{#if:{{{tab alignment|}}}|{{{tab alignment}}}|center}}; {{#if:{{{rounding|}}}|border-radius:{{{rounding}}} {{{rounding}}} 0 0;}} padding:0.3em; border: {{#if:{{{border|}}}|{{{border}}}|solid 1px #a3b1bf}}; font-size: {{#if:{{{font-size|}}}|{{{font-size}}}|110%}}; {{#switch:{{FULLPAGENAME}}|{{{link}}}|{{{link2}}}|{{{link3}}}|{{{link4}}}|{{{link5}}}=background-color: {{#if:{{{on tab color|}}}|{{{on tab color}}}|transparent}}; border-bottom-color: {{#if:{{{on tab color|}}}|{{{on tab color}}}|transparent}}; font-weight:bold; |#default=background-color: {{#if:{{{off tab color|}}}|{{{off tab color}}}|#CEE0F2}}; }} {{#ifeq:{{lc:{{{nowrap|}}}}}|yes|white-space: nowrap;}} width: {{#expr:(100/{{Number of defined parameters|{{{1}}}|{{{2}}}|{{{3}}}|{{{4}}}|{{{5}}}|{{{6}}}|{{{7}}}|{{{8}}}|{{{9}}}|{{{10}}}|{{{11}}}|{{{12}}}|{{{13}}}|{{{14}}}|{{{15}}}|{{{16}}}|{{{17}}}|{{{18}}}|{{{19}}}|{{{20}}}}})-{{#if:{{{tab spacing percent|}}}|{{{tab spacing percent}}}|2}}}}%;">{{#if:{{{image|}}}|[[file:{{{image}}}|20px|{{{tab}}}|link={{{link|}}}]] }}{{#ifeq:{{lc:{{{freeform|}}}}}|yes|{{{tab}}}|[[{{{link}}}|{{{tab}}}]]}}</td></includeonly><noinclude>{{documentation}}[[Category:Tab Templates]]</noinclude> |
Latest revision as of 21:34, 7 May 2022
This template is called by {{Start tab}} and {{End tab}} to create tab bars for use in navigating WikiProjects and other areas outside of the main encyclopedia. It should not be used on articles themselves.
Usage
{{tab}} expects link
and tab
to be passed to it. If the current page title matches link
then the tab will be styled differently. If freeform
is passed then the tab text is displayed freeform as it is; otherwise, the text from tab
is used to label the wikilink pointed to be link
.
See also
<div style="background-color:#Expression error: Unexpected = operator.;">