More actions
m →Styling: spacing fix |
mNo edit summary Tag: 2017 source edit |
||
(21 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
This is a user interface aid for integration of subjects with the same name over different articles, i.e. ''[[Celestra]]'', thus allowing any user to go between them without needing to click through multiple different pages. | This is a user interface aid for integration of subjects with the same name over different articles, i.e. ''[[Celestra]]'', thus allowing any user to go between them without needing to click through multiple different pages. | ||
This template allows for nested tabs, for disambiguations that have multiple subjects sharing the same name, i.e. [[Adama]]. | |||
= Documentation = | = Documentation = | ||
; For unnested tabs | |||
<code><nowiki>{{DisambigTab|article|article2|article3}}</nowiki></code> | <code><nowiki>{{DisambigTab|article|article2|article3}}</nowiki></code> | ||
; For nested tabs | |||
<pre><nowiki>{{DisambigTab | |||
|tab1=Grouping 1 | |||
|subtab1_1=Article One | |||
|subtab1_2=Article Two | |||
|tab2=Grouping 2 | |||
|subtab2_1=Article Three}}</nowiki></pre> | |||
This template supports multiple article arguments, but please limit the number 10 for performance reasons. | This template supports multiple article arguments, but please limit the number 10 for performance reasons. | ||
== Example == | == Example == | ||
; For unnested tabs | |||
<code><nowiki>{{DisambigTab|Celestra (TOS)|Celestra (RDM)|Celestra (TOS-RH)}}</nowiki></code> | <code><nowiki>{{DisambigTab|Celestra (TOS)|Celestra (RDM)|Celestra (TOS-RH)}}</nowiki></code> | ||
Will generate [[/example|this example]] (linked separately for demonstration reasons). | Will generate [[/example|this example]] (linked separately for demonstration reasons). | ||
; For nested tabs | |||
<pre> | |||
{{DisambigTab | |||
|tab1=Original Series | |||
|subtab1_1=Adama (TOS) | |||
|subtab1_2=Adama's Medallion | |||
|subtab1_3=Adama's quarters | |||
|tab2=Galactica 1980 | |||
|subtab2_1=Adama (1980) | |||
|tab3=Re-imagined Series | |||
|subtab3_1=Carolanne Adama | |||
|subtab3_2=Joseph Adama | |||
|subtab3_3=Lee Adama | |||
|subtab3_4=William Adama | |||
|subtab3_5=Zak Adama | |||
}}</pre> | |||
Will generate [[/nestedexample|this example]] (linked separately for demonstration reasons). | |||
=== Nested Tabs === | |||
To group nested tabs properly you MUST mirror the numbering, i.e. for tabs being grouped in tab1, you must declare a '''tab''1''''', and then '''subtab''1''_XXX'''. | |||
For multiple tabs within a grouping, define a separate subtab with a unique identifier after the underscore (_). The example below will help. | |||
Also, it is best to organize them for human readability when editing: | |||
|'''tab1'''=SUBJECT 1 | |||
|'''subtab1_1'''=Article 1 | |||
|'''subtab1_2'''=Article 2 | |||
|'''subtab1_3'''=Article 3 | |||
|'''tab2'''=SUBJECT 2 | |||
|'''subtab2_1'''=Article 4 | |||
|'''tab3'''=SUBJECT 3 | |||
|'''subtab3_1'''=Article 5 | |||
|'''subtab3_2'''=Article 6 | |||
== Notes and Caveats == | == Notes and Caveats == | ||
Line 21: | Line 74: | ||
* [[Original Series]] article | * [[Original Series]] article | ||
* ''[[Galactica 1980]]'' article | |||
* [[Re-imagined Series]] article | * [[Re-imagined Series]] article | ||
* ''[[Caprica (series)|Caprica]]'' article | * ''[[Caprica (series)|Caprica]]'' article | ||
Line 48: | Line 102: | ||
[[Category:Battlestar Wiki Templates]] | [[Category:Battlestar Wiki Templates]] | ||
</noinclude> | </noinclude> | ||
<includeonly>{{disambig}}{{clear}} | <includeonly>{{#if:{{{sort|}}}|{{void}}|{{DEFAULTSORT:{{#titleparts:{{PAGENAME}}}}}}}}{{#if:{{{disambig|}}}|{{void}}|{{disambig}}}}__NOEDITSECTION__{{clear}} | ||
{{#tag:tabber|{{#fornumargs: number|value|{{#var:value}}={{:{{#var:value}}}}{{!}}-{{!}}}}}} | {{#if: {{{tab|}}}{{{tab1|}}} | | ||
<!-- engage nested tab mode --> | |||
{{#tag:tabber| | |||
{{#forargs:tab|key|tabname|{{#var:tabname}}= | |||
{{#tag:tabber| | |||
{{#forargs:subtab|tabnumber|value| | |||
{{#ifeq:{{#var:key}}|{{#sub:{{#var:tabnumber}}|0|1}}|{{#ifexist:{{#var:value}}|{{#var:value}}={{:{{#var:value}}}}{{!}}-{{!}}|<!--void-->}}}} | |||
}} | |||
}}{{!}}-{{!}} | |||
}} | |||
{{#if:{{{summary|}}}{{{title|}}}|{{{title}}}={{{summary}}}}} | |||
}} | |||
|<!-- not nested--> | |||
{{#tag:tabber|{{#fornumargs: number|value|{{#ifexist:{{#var:value}}|{{#var:value}}={{:{{#var:value}}}}{{!}}-{{!}} | |||
|<!--void-->}}}}{{#if:{{{summary|}}}{{{title|}}}|{{{title}}}={{{summary}}}}}}} | |||
}} | |||
For direct navigation sans the tabbed navigational aid above, please select one of the following article links: | For direct navigation sans the tabbed navigational aid above, please select one of the following article links: | ||
<ul> | <ul> | ||
{{#fornumargs: number|value|<li>[[{{#var:value}}]]</li>}} | {{#if: {{{tab|}}}{{{tab1|}}}| | ||
<!-- engage nested tab mode --> | |||
{{#forargs: subtab|tabnumb|value|{{#ifexist:{{#var:value}}|<li>[[{{#var:value}}]]</li>|<!--ignore-->}}}}|{{#fornumargs: number|value|{{#ifexist:{{#var:value}}|<li>[[{{#var:value}}]]</li>|<!--ignore-->}}}} | |||
}} | |||
</ul> | </ul> | ||
{{#if:{{{disambig|}}}|{{void}}|__NOCAT__}} | |||
</includeonly> | </includeonly> | ||
<noinclude> | |||
<templatedata> | |||
{ | |||
"params": { | |||
"1": { | |||
"type": "wiki-page-name" | |||
}, | |||
"2": { | |||
"type": "wiki-page-name" | |||
}, | |||
"3": { | |||
"type": "wiki-page-name" | |||
}, | |||
"4": { | |||
"type": "wiki-page-name" | |||
}, | |||
"tab1": {}, | |||
"subtab1_1": { | |||
"type": "wiki-page-name" | |||
}, | |||
"subtab1_2": { | |||
"type": "wiki-page-name" | |||
}, | |||
"subtab1_3": { | |||
"type": "wiki-page-name" | |||
}, | |||
"subtab1_4": { | |||
"type": "wiki-page-name" | |||
}, | |||
"subtab1_5": { | |||
"type": "wiki-page-name" | |||
}, | |||
"tab2": {}, | |||
"subtab2_1": { | |||
"type": "wiki-page-name" | |||
}, | |||
"subtab2_2": { | |||
"type": "wiki-page-name" | |||
}, | |||
"subtab2_3": { | |||
"type": "wiki-page-name" | |||
}, | |||
"subtab2_4": { | |||
"type": "wiki-page-name" | |||
}, | |||
"subtab2_5": { | |||
"type": "wiki-page-name" | |||
}, | |||
"tab3": {}, | |||
"subtab3_1": { | |||
"type": "wiki-page-name" | |||
}, | |||
"subtab3_2": { | |||
"type": "wiki-page-name" | |||
}, | |||
"subtab3_3": { | |||
"type": "wiki-page-name" | |||
}, | |||
"subtab3_4": { | |||
"type": "wiki-page-name" | |||
}, | |||
"subtab3_5": { | |||
"type": "wiki-page-name" | |||
}, | |||
"tab4": {}, | |||
"subtab4_1": { | |||
"type": "wiki-page-name" | |||
}, | |||
"subtab4_2": { | |||
"type": "wiki-page-name" | |||
}, | |||
"subtab4_3": { | |||
"type": "wiki-page-name" | |||
}, | |||
"subtab4_4": { | |||
"type": "wiki-page-name" | |||
}, | |||
"subtab4_5": { | |||
"type": "wiki-page-name" | |||
} | |||
} | |||
} | |||
</templatedata> | |||
</noinclude> |
Latest revision as of 18:04, 8 December 2024
This is a user interface aid for integration of subjects with the same name over different articles, i.e. Celestra, thus allowing any user to go between them without needing to click through multiple different pages.
This template allows for nested tabs, for disambiguations that have multiple subjects sharing the same name, i.e. Adama.
Documentation[edit]
- For unnested tabs
{{DisambigTab|article|article2|article3}}
- For nested tabs
{{DisambigTab |tab1=Grouping 1 |subtab1_1=Article One |subtab1_2=Article Two |tab2=Grouping 2 |subtab2_1=Article Three}}
This template supports multiple article arguments, but please limit the number 10 for performance reasons.
Example[edit]
- For unnested tabs
{{DisambigTab|Celestra (TOS)|Celestra (RDM)|Celestra (TOS-RH)}}
Will generate this example (linked separately for demonstration reasons).
- For nested tabs
{{DisambigTab |tab1=Original Series |subtab1_1=Adama (TOS) |subtab1_2=Adama's Medallion |subtab1_3=Adama's quarters |tab2=Galactica 1980 |subtab2_1=Adama (1980) |tab3=Re-imagined Series |subtab3_1=Carolanne Adama |subtab3_2=Joseph Adama |subtab3_3=Lee Adama |subtab3_4=William Adama |subtab3_5=Zak Adama }}
Will generate this example (linked separately for demonstration reasons).
Nested Tabs[edit]
To group nested tabs properly you MUST mirror the numbering, i.e. for tabs being grouped in tab1, you must declare a tab1, and then subtab1_XXX.
For multiple tabs within a grouping, define a separate subtab with a unique identifier after the underscore (_). The example below will help.
Also, it is best to organize them for human readability when editing:
|tab1=SUBJECT 1 |subtab1_1=Article 1 |subtab1_2=Article 2 |subtab1_3=Article 3 |tab2=SUBJECT 2 |subtab2_1=Article 4 |tab3=SUBJECT 3 |subtab3_1=Article 5 |subtab3_2=Article 6
Notes and Caveats[edit]
Styling[edit]
By default, the organization of each link should be thus:
- Original Series article
- Galactica 1980 article
- Re-imagined Series article
- Caprica article
- Blood and Chrome article
- Separate continuity articles, in the above order.
For the Celestra disambiguation example, the organization is thus:
- Celestra (TOS) - Original Series article
- Celestra (RDM) - Re-imagined Series article
- Celestra (TOS-RH) - Separate continuity article from the Richard Hatch series, ergo the initialism "(TOS-RH)" suffix.
Redirects[edit]
Should you point to a redirect within this template call, it will show the page the redirect points to, instead of the redirect page itself.
Further, if the redirect has an anchor to it, e.g. The Fleet (TOS-RH)#Celestra, browsers will probably not "jump" you to that anchor when the tab is selected.
[edit]
When used on a disambiguation page, the footer of this template prints out a list of links that are called. This may be helpful to those who have older and outdated browsers, or perhaps are on mobile devices with smaller screens.
Categorization[edit]
Due to MediaWiki technical limitations, categories from each page called within the template are reproduced on the page that this template is deployed on. Thus, it will also list the disambiguation page within those categories... there's no way around it, presently. C'est la vie.
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
1 | 1 | no description | Page name | optional |
2 | 2 | no description | Page name | optional |
3 | 3 | no description | Page name | optional |
4 | 4 | no description | Page name | optional |
tab1 | tab1 | no description | Unknown | optional |
subtab1_1 | subtab1_1 | no description | Page name | optional |
subtab1_2 | subtab1_2 | no description | Page name | optional |
subtab1_3 | subtab1_3 | no description | Page name | optional |
subtab1_4 | subtab1_4 | no description | Page name | optional |
subtab1_5 | subtab1_5 | no description | Page name | optional |
tab2 | tab2 | no description | Unknown | optional |
subtab2_1 | subtab2_1 | no description | Page name | optional |
subtab2_2 | subtab2_2 | no description | Page name | optional |
subtab2_3 | subtab2_3 | no description | Page name | optional |
subtab2_4 | subtab2_4 | no description | Page name | optional |
subtab2_5 | subtab2_5 | no description | Page name | optional |
tab3 | tab3 | no description | Unknown | optional |
subtab3_1 | subtab3_1 | no description | Page name | optional |
subtab3_2 | subtab3_2 | no description | Page name | optional |
subtab3_3 | subtab3_3 | no description | Page name | optional |
subtab3_4 | subtab3_4 | no description | Page name | optional |
subtab3_5 | subtab3_5 | no description | Page name | optional |
tab4 | tab4 | no description | Unknown | optional |
subtab4_1 | subtab4_1 | no description | Page name | optional |
subtab4_2 | subtab4_2 | no description | Page name | optional |
subtab4_3 | subtab4_3 | no description | Page name | optional |
subtab4_4 | subtab4_4 | no description | Page name | optional |
subtab4_5 | subtab4_5 | no description | Page name | optional |