Template:Tabber: Difference between revisions

From Chibi-Robo! Wiki
Jump to navigation Jump to search
mNo edit summary
Tag: 2017 source edit
mNo edit summary
Tag: 2017 source edit
 
(4 intermediate revisions by the same user not shown)
Line 8: Line 8:
<div class="pagetabber">
<div class="pagetabber">


[[{{{base}}}|<span {{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|active}}" style="padding:5px; border: 2px solid #231F20; border-color: black #231F20 #231F20; border-radius:0px 0px 5px 5px; float: left; margin-right: 5px; min-width: 80px; text-align: center; font-weight: bold; background-color: #819BA8;"><small>{{{tab1}}}</small></span>]]
[[{{{base}}}|<span {{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|active}}" style="padding:5px; border: 2px solid #231F20; border-color: black #231F20 #231F20; border-radius:0px 0px 5px 5px; float: left; margin-right: 5px; min-width: 80px; text-align: center; font-weight: bold; background-color: #819BA8; color: #FFFEFC;"><small>{{{tab1}}}</small></span>]]


{{#if: {{{tab2|}}}|
{{#if: {{{tab2|}}}|


     [[{{{base}}}/{{{tab2}}}|<span {{#ifeq:{{SUBPAGENAME}}|{{{tab2}}}|active}}" style="padding:5px; border: 2px solid #231F20; border-color: black #231F20 #231F20; border-radius:0px 0px 5px 5px; float: left; margin-right: 5px; min-width: 80px; text-align: center; font-weight: bold; background-color: #FFCE05;"><small>{{{tab2}}}</small></span>]]
     [[{{{base}}}/{{{tab2}}}|<span {{#ifeq:{{SUBPAGENAME}}|{{{tab2}}}|active}}" style="padding:5px; border: 2px solid #231F20; border-color: black #231F20 #231F20; border-radius:0px 0px 5px 5px; float: left; margin-right: 5px; min-width: 80px; text-align: center; font-weight: bold; background-color: #FFCE05; color: #006CB0;"><small>{{{tab2}}}</small></span>]]
}}{{#if: {{{tab3|}}}|
}}{{#if: {{{tab3|}}}|


     [[{{{base}}}/{{{tab3}}}|<span {{#ifeq:{{SUBPAGENAME}}|{{{tab3}}}|active}}" style="padding:5px; border: 2px solid #231F20; border-color: black #231F20 #231F20; border-radius:0px 0px 5px 5px; float: left; margin-right: 5px; min-width: 80px; text-align: center; font-weight: bold; background-color: #AED136;"><small>{{{tab3}}}</small></span>]]
     [[{{{base}}}/{{{tab3}}}|<span {{#ifeq:{{SUBPAGENAME}}|{{{tab3}}}|active}}" style="padding:5px; border: 2px solid #231F20; border-color: black #231F20 #231F20; border-radius:0px 0px 5px 5px; float: left; margin-right: 5px; min-width: 80px; text-align: center; font-weight: bold; background-color: #AED136; color: #F5812C;"><small>{{{tab3}}}</small></span>]]
}}{{#if: {{{tab4|}}}|
}}{{#if: {{{tab4|}}}|


     [[{{{base}}}/{{{tab4}}}|<span {{#ifeq:{{SUBPAGENAME}}|{{{tab4}}}|active}}" style="padding:5px; border: 2px solid #231F20; border-color: black #231F20 #231F20; border-radius:0px 0px 5px 5px; float: left; margin-right: 5px; min-width: 80px; text-align: center; font-weight: bold; background-color: #FF9431;"><small>{{{tab4}}}</small></span>]]
     [[{{{base}}}/{{{tab4}}}|<span {{#ifeq:{{SUBPAGENAME}}|{{{tab4}}}|active}}" style="padding:5px; border: 2px solid #231F20; border-color: black #231F20 #231F20; border-radius:0px 0px 5px 5px; float: left; margin-right: 5px; min-width: 80px; text-align: center; font-weight: bold; background-color: #FF9431; color: #FEE83D;"><small>{{{tab4}}}</small></span>]]
}}{{#if: {{{tab5|}}}|
}}{{#if: {{{tab5|}}}|


     [[{{{base}}}/{{{tab5}}}|<span {{#ifeq:{{SUBPAGENAME}}|{{{tab5}}}|active}}" style="padding:5px; border: 2px solid #231F20; border-color: black #231F20 #231F20; border-radius:0px 0px 5px 5px; float: left; margin-right: 5px; min-width: 80px; text-align: center; font-weight: bold; background-color: #28A3DB;"><small>{{{tab5}}}</small></span>]]
     [[{{{base}}}/{{{tab5}}}|<span {{#ifeq:{{SUBPAGENAME}}|{{{tab5}}}|active}}" style="padding:5px; border: 2px solid #231F20; border-color: black #231F20 #231F20; border-radius:0px 0px 5px 5px; float: left; margin-right: 5px; min-width: 80px; text-align: center; font-weight: bold; background-color: #28A3DB; color: #4C4485;"><small>{{{tab5}}}</small></span>]]
}}{{#if: {{{tab6|}}}|
}}{{#if: {{{tab6|}}}|


     [[{{{base}}}/{{{tab6}}}|<span {{#ifeq:{{SUBPAGENAME}}|{{{tab6}}}|active}}" style="padding:5px; border: 2px solid #231F20; border-color: black #231F20 #231F20; border-radius:0px 0px 5px 5px; float: left; margin-right: 5px; min-width: 80px; text-align: center; font-weight: bold; background-color: #B56259;"><small>{{{tab6}}}</small></span>]]
     [[{{{base}}}/{{{tab6}}}|<span {{#ifeq:{{SUBPAGENAME}}|{{{tab6}}}|active}}" style="padding:5px; border: 2px solid #231F20; border-color: black #231F20 #231F20; border-radius:0px 0px 5px 5px; float: left; margin-right: 5px; min-width: 80px; text-align: center; font-weight: bold; background-color: #C8C8C8; color: #595757;"><small>{{{tab6}}}</small></span>]]
}}{{#if: {{{tab7|}}}|
}}{{#if: {{{tab7|}}}|



Latest revision as of 04:50, 10 October 2021

Page Navigation

[[{{{base}}}|{{{tab1}}}]]



Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]

This template is for use of navigating between subpages of a base page.

Directions for Use

Create a new template using the copy code below. Each tab element is used for making a new subpage with that name. When creating the template, be sure to categorize the template as a Navbox template. This is important for making sure the links display on mobile.

Copy Code

The following code is cleaned up for copying and pasting purposes.

{{Tabber
|base = 
|tab1 = 
|tab2 = 
|tab3 = 
|tab4 = 
|tab5 = 
|tab6 = 
|tab7 = 
}}

Code Description

{{Tabber
|base = Base page's name
|tab1 = Sets link text for first block. Says "Overview" by default. Links to base.
|tab2 = Subpage's name after the slash
|tab3 = Subpage's name after the slash
|tab4 = Subpage's name after the slash
|tab5 = Subpage's name after the slash
|tab6 = Subpage's name after the slash
|tab7 = Subpage's name after the slash
}}
Note 1: For tab2 through tab7, if you wish to link to the Chibi-Robo Gallery on, say, tab3, the page would be Chibi-Robo/Gallery and the code would have base=Chibi-Robo and tab3=Gallery.
Note 2: tab2 through tab7 will not appear unless there is data assigned to them.

Example

The code...

{{Tabber
|base = Chibi-Robo
|tab2 = History
|tab3 = Gallery
|tab4 = Audio
|tab5 = Trivia
}}

...results in...

Page Navigation


The code...

{{Tabber
|base = Chibi-Robo
|tab1 = Data
|tab2 = History
|tab3 = Gallery
|tab4 = Audio
|tab5 = Trivia
}}

...results in...

Page Navigation


*A foundation for this code was taken from the RWBY Wiki and edited to be our own.
The above text is transcluded from Template:Tabber/doc; you can change it or view its history. (How does this work?)
If you're done making changes, please refresh the text. (Why?)
You can experiment in this template's sandbox (create | mirror ) and testcases (create) pages.
Please add categories and interwikis to Template:Tabber/doc. (View all subpages of this page.)