Template information, documentation, and installation instructions.
Expand the below text for usage and other information.
Expand the below text for usage and other information.
Template Documentation:
Note: The template above might be broken without the parameters; while not ideal and often not necessary, this is common.
View, edit, or check the history of this documentation. (How does this work?)
Editors can experiment with this template's sandbox and testcases.
View, edit, or check the history of this documentation. (How does this work?)
Editors can experiment with this template's sandbox and testcases.
This template creates a tab bar for navigating through subpages.
It will be usually placed at the top of the main page and its subpages. The content will be the same for any of the pages.
Usage
{{Customtabs|
subpage 1…9 |base}}
- subpage 1…9
- The name of the subpage is the part after the slash character in the url (ex: Main page/Subpage).
- You can add to 9 subpages.
- base
- Optional
- Can change the text of the link related to the main page.
- If used, this parameter must always be the last.
Styles
This template uses the following styles that you can import from Template:Customtabs/styles.css or copy to your wiki's css.
.customtabs ul {
list-style: none;
margin: 1em 0;
}
.customtabs li {
display: inline-block;
margin-bottom: 2ex; /* Avoid links to overlap */
}
/* Normal & "red" links and current page pseudo-link look the same */
.customtabs a,
.customtabs .mw-selflink,
.customtabs .new {
border: thin solid;
padding: 1ex;
}
.customtabs a { border: 1px solid var(--theme-link-color); }
Example
{{Customtabs|doc|foo}}
will display…
{{Customtabs|doc|foo|base=Bar}}
will display…
- When a link leads to the current page, it simply appears as bold text.
- When a link leads to a non-existing page (here, Main page/foo), it appears as a red link for registered users or as normal text for unregistered users.
Notes
The type of this template is Design, so it can run on mobile. If the CSS is not loading for some reason, the tab bar will be displayed as a simple list of links.
Installation Instructions
- Export this template, then import to install it.
Use edit summary:Copied from [[w:c:templates:Template:Customtabs]]to properly attribute this template's editors.
- There is no additional installation instructions for this template. If there is any, you may create it at Template:Customtabs/install.