Template:Tabber: Difference between revisionsGive feedback
Gammaton32 (talk | contribs) corrected highlight to recognize spaces |
No edit summary |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><div | <includeonly><div class="hero-tabs"><templatestyles src="Template:HeroTabs/styles.css"/><!-- | ||
-->{{#if:{{{1|}}}| <div | -->{{#if:{{{1|}}}| <div class="hero-tab {{#ifeq: {{FULLPAGENAMEE}} | {{{1|{{ROOTPAGENAMEE}}}}} | hero-tab-active }}">[[{{{1|}}}|{{#ifeq: {{FULLPAGENAMEE}} | {{{1|{{ROOTPAGENAMEE}}}}} | |<span class="hero-tab-inactive">}}{{#if:{{{t1|}}}|{{translate|{{{t1}}}}}|{{{l1|{{{1|}}}}}}}}{{#ifeq: {{FULLPAGENAMEE}} | {{{1|{{ROOTPAGENAMEE}}}}} | |</span>}}]]</div>|}}<!-- | ||
-->{{#if:{{{2|}}}| <div | -->{{#if:{{{2|}}}| <div class="hero-tab {{#ifeq: {{FULLPAGENAME}} | {{{2|{{ROOTPAGENAMEE}}}}} | hero-tab-active }}">[[{{{2|}}}|{{#ifeq: {{FULLPAGENAME}} | {{{2|{{ROOTPAGENAMEE}}}}} | |<span class="hero-tab-inactive">}}{{#if:{{{t2|}}}|{{translate|{{{t2}}}}}|{{{l2|{{{2|}}}}}}}}{{#ifeq: {{FULLPAGENAME}} | {{{2|{{ROOTPAGENAMEE}}}}} | |</span>}}]]</div>|}}<!-- | ||
-->{{#if:{{{3|}}}| <div | -->{{#if:{{{3|}}}| <div class="hero-tab {{#ifeq: {{FULLPAGENAME}} | {{{3|{{ROOTPAGENAMEE}}}}} | hero-tab-active }}">[[{{{3|}}}|{{#ifeq: {{FULLPAGENAME}} | {{{3|{{ROOTPAGENAMEE}}}}} | |<span class="hero-tab-inactive">}}{{#if:{{{t3|}}}|{{translate|{{{t3}}}}}|{{{l3|{{{3|}}}}}}}}{{#ifeq: {{FULLPAGENAME}} | {{{3|{{ROOTPAGENAMEE}}}}} | |</span>}}]]</div>|}}<!-- | ||
-->{{#if:{{{4|}}}| <div | -->{{#if:{{{4|}}}| <div class="hero-tab {{#ifeq: {{FULLPAGENAME}} | {{{4|{{ROOTPAGENAMEE}}}}} | hero-tab-active }}">[[{{{4|}}}|{{#ifeq: {{FULLPAGENAME}} | {{{4|{{ROOTPAGENAMEE}}}}} | |<span class="hero-tab-inactive">}}{{#if:{{{t4|}}}|{{translate|{{{t4}}}}}|{{{l4|{{{4|}}}}}}}}{{#ifeq: {{FULLPAGENAME}} | {{{4|{{ROOTPAGENAMEE}}}}} | |</span>}}]]</div>|}}<!-- | ||
--></div></includeonly><!-- | --></div></includeonly><!-- | ||
--><noinclude>{{Documentation}}</noinclude> | --><noinclude>{{Documentation}}</noinclude> | ||
Latest revision as of 11:13, 18 July 2026
Template used to create Tabs for any page. The numbers are the names of the pages. l1, l2 etc. are used for manual alternate names, while t1, t2 etc. are used for automatic translations from Data:Dictionary.
Examples
[edit source]{{Tabber|1=Heroes|2=Hero Attributes Table}}
{{Tabber|1=Heroes|2=Hero Attributes Table|l2=Attributes Table}}
Example of automatic translation (Simulated view of a Chinese page). Note: The link (1=) usually points to the specific language page.
{{Tabber|1=Heroes/zh-hans|t1=Heroes}}
Template used to create navigation tabs for any page.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Tab 1 Link | 1 | Page name for the first tab. | Page name | required |
| Tab 1 Label | l1 | Manual text override for Tab 1. | String | optional |
| Tab 1 Translation Key | t1 | Dictionary key for automatic translation of Tab 1. (e.g. 'Heroes') | String | optional |
| Tab 2 Link | 2 | Page name for the second tab. | Page name | optional |
| Tab 2 Label | l2 | Manual text override for Tab 2. | String | optional |
| Tab 2 Translation Key | t2 | Dictionary key for automatic translation of Tab 2. | String | optional |
| Tab 3 Link | 3 | Page name for the third tab. | Page name | optional |
| Tab 3 Label | l3 | Manual text override for Tab 3. | String | optional |
| Tab 3 Translation Key | t3 | Dictionary key for automatic translation of Tab 3. | String | optional |
| Tab 4 Link | 4 | Page name for the fourth tab. | Page name | optional |
| Tab 4 Label | l4 | Manual text override for Tab 4. | String | optional |
| Tab 4 Translation Key | t4 | Dictionary key for automatic translation of Tab 4. | String | optional |