Template:Subpage tabs: Difference between revisions
From Tardis Wiki, the free Doctor Who reference
No edit summary Tags: Mobile edit Mobile web edit |
Bongolium500 (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{{#if:{{#explode:{{PAGENAME}}|/|1}}||<div id="subpage-{{#ifeq:{{NAMESPACENUMBER}}|1|talk|article}}">}}{{#invoke:Subpage tabs|produceTabs}}{{#if:{{#explode:{{PAGENAME}}|/|1}}||</div>}}</includeonly><noinclude>{{documentation}}[[Category:Navigation templates]]</noinclude> | <includeonly><templatestyles src="Subpage tabs/styles.css" />{{#if:{{#explode:{{PAGENAME}}|/|1}}||<div id="subpage-{{#ifeq:{{NAMESPACENUMBER}}|1|talk|article}}">}}{{#invoke:Subpage tabs|produceTabs}}{{#if:{{#explode:{{PAGENAME}}|/|1}}||</div>}}</includeonly><noinclude>{{documentation}}[[Category:Navigation templates]]</noinclude> |
Latest revision as of 20:00, 30 April 2024
Instructions for {{Subpage tabs}}
{{Subpage tabs}} creates a series of tab-like links to the subpages of the page they're placed on. Basic usage is very simple. Simply place {{subpage tabs}} at the top of the page, above any other templates. This will automatically produce links to the following standardised subpages, if they exist for this page, in this order:
By default, tabs are created for the current page, or it's base page one level higher in the subpage order. If required, a different page can be specified and tabs will instead be displayed for that page. This done using |p=. For example, to generate tabs for Davros, you'd type:
- Biography
- Spoilers
- Physical appearance
- Other realities
- Non-valid material
- Promotion
- Gallery
- Appearances
{{subpage tabs|Custom subpage 1|Custom subpage 2}}You can specify as many additional subpages as necassary. Note that additional subpages always display after custom ones.
By default, tabs are created for the current page, or it's base page one level higher in the subpage order. If required, a different page can be specified and tabs will instead be displayed for that page. This done using |p=. For example, to generate tabs for Davros, you'd type:
{{subpage tabs|p=Davros}}The following code produces the series of tabs shown below:
{{subpage tabs|p=Davros|Custom subpage}}
Technical documentation[[edit source]]
All heavy lifting for this template is done in Module:Subpage tabs. One important part is the table defined on line 3: this controls which subpages are looked for automatically and in what order they are displayed.
Styling for this template is largely at /styles.css. All colours are defined in MediaWiki:Gadget-ms-Tardis.css.