Welcome to the DFO World Wiki. With many major updates since the release of DFO, many items are missing. Visit Item Database Project to learn more.
Please remember to click "show preview" before saving the page.
Thanks for the updated logo snafuPop!

Difference between revisions of "Template:PageTabs"

From DFO World Wiki
Jump to: navigation, search
m
m
 
Line 2: Line 2:
 
   {{#if:{{{tab1|}}}|
 
   {{#if:{{{tab1|}}}|
 
     <th style="
 
     <th style="
       {{TabBox|color=#FFFFFF}}
+
       {{#ifeq:{{SUBPAGENAME}}|{{{tab1}}} <!--Check for active-tab -->
 +
      |{{TabBox|bg=#36454F}}
 +
      |{{#ifeq:{{PAGENAME}}|{{{rootpage|{{ROOTPAGENAME}}}}}
 +
        |{{TabBox|bg=#36454F}}
 +
        |{{TabBox}}
 +
        }}
 +
      }}
 
     "
 
     "
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}{{!}}<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab1}}}</span>|{{{tab1}}}{{!}}<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab1name|{{{tab1}}}}}}</span>}}]]</div>
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}{{!}}<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab1}}}</span>|{{{tab1}}}{{!}}<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab1name|{{{tab1}}}}}}</span>}}]]</div>
Line 9: Line 15:
 
   {{#if:{{{tab2|}}}|
 
   {{#if:{{{tab2|}}}|
 
     <th style="
 
     <th style="
       {{TabBox}}
+
       {{#ifeq:{{SUBPAGENAME}}|{{{tab2}}} <!--Check for active-tab -->
 +
      |{{TabBox|bg=#36454F}}
 +
      |{{TabBox}}
 +
      }}
 
     "
 
     "
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab2}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab2name|{{{tab2}}}}}}</span>]]</div>
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab2}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab2name|{{{tab2}}}}}}</span>]]</div>
Line 16: Line 25:
 
   {{#if:{{{tab3|}}}|
 
   {{#if:{{{tab3|}}}|
 
     <th style="
 
     <th style="
       {{TabBox}}
+
       {{#ifeq:{{SUBPAGENAME}}|{{{tab3}}} <!--Check for active-tab -->
 +
      |{{TabBox|bg=#36454F}}
 +
      |{{TabBox}}
 +
      }}
 
     "
 
     "
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab3}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab3name|{{{tab3}}}}}}</span>]]</div>
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab3}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab3name|{{{tab3}}}}}}</span>]]</div>
Line 23: Line 35:
 
   {{#if:{{{tab4|}}}|
 
   {{#if:{{{tab4|}}}|
 
     <th style="
 
     <th style="
       {{TabBox}}
+
       {{#ifeq:{{SUBPAGENAME}}|{{{tab4}}} <!--Check for active-tab -->
 +
      |{{TabBox|bg=#36454F}}
 +
      |{{TabBox}}
 +
      }}
 
     "
 
     "
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab4}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab4name|{{{tab4}}}}}}</span>]]</div>
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab4}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab4name|{{{tab4}}}}}}</span>]]</div>
Line 30: Line 45:
 
   {{#if:{{{tab5|}}}|
 
   {{#if:{{{tab5|}}}|
 
     <th style="
 
     <th style="
       {{TabBox}}
+
       {{#ifeq:{{SUBPAGENAME}}|{{{tab5}}} <!--Check for active-tab -->
 +
      |{{TabBox|bg=#36454F}}
 +
      |{{TabBox}}
 +
      }}
 
     "
 
     "
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab5}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab5name|{{{tab5}}}}}}</span>]]</div>
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab5}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab5name|{{{tab5}}}}}}</span>]]</div>
Line 37: Line 55:
 
   {{#if:{{{tab6|}}}|
 
   {{#if:{{{tab6|}}}|
 
     <th style="
 
     <th style="
       {{TabBox}}
+
       {{#ifeq:{{SUBPAGENAME}}|{{{tab6}}} <!--Check for active-tab -->
 +
      |{{TabBox|bg=#36454F}}
 +
      |{{TabBox}}
 +
      }}
 
     "
 
     "
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab6}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab6name|{{{tab6}}}}}}</span>]]</div>
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab6}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab6name|{{{tab6}}}}}}</span>]]</div>
Line 44: Line 65:
 
   {{#if:{{{tab7|}}}|
 
   {{#if:{{{tab7|}}}|
 
     <th style="
 
     <th style="
       {{TabBox}}
+
       {{#ifeq:{{SUBPAGENAME}}|{{{tab7}}} <!--Check for active-tab -->
 +
      |{{TabBox|bg=#36454F}}
 +
      |{{TabBox}}
 +
      }}
 
     "
 
     "
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab7}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab7name|{{{tab7}}}}}}</span>]]</div>
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab7}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab7name|{{{tab7}}}}}}</span>]]</div>
Line 51: Line 75:
 
   {{#if:{{{tab8|}}}|
 
   {{#if:{{{tab8|}}}|
 
     <th style="
 
     <th style="
       {{TabBox}}
+
       {{#ifeq:{{SUBPAGENAME}}|{{{tab8}}} <!--Check for active-tab -->
 +
      |{{TabBox|bg=#36454F}}
 +
      |{{TabBox}}
 +
      }}
 
     "
 
     "
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab8}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab8name|{{{tab8}}}}}}</span>]]</div>
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab8}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab8name|{{{tab8}}}}}}</span>]]</div>
Line 58: Line 85:
 
   {{#if:{{{tab9|}}}|
 
   {{#if:{{{tab9|}}}|
 
     <th style="
 
     <th style="
       {{TabBox}}
+
       {{#ifeq:{{SUBPAGENAME}}|{{{tab9}}} <!--Check for active-tab -->
 +
      |{{TabBox|bg=#36454F}}
 +
      |{{TabBox}}
 +
      }}
 
     "
 
     "
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab9}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab9name|{{{tab9}}}}}}</span>]]</div>
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab9}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab9name|{{{tab9}}}}}}</span>]]</div>
Line 65: Line 95:
 
   {{#if:{{{tab10|}}}|
 
   {{#if:{{{tab10|}}}|
 
     <th style="
 
     <th style="
       {{TabBox}}
+
       {{#ifeq:{{SUBPAGENAME}}|{{{tab10}}} <!--Check for active-tab -->
 +
      |{{TabBox|bg=#36454F}}
 +
      |{{TabBox}}
 +
      }}
 
     "
 
     "
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab10}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab10name|{{{tab10}}}}}}</span>]]</div>
 
     ><div>[[{{{namespace|{{NAMESPACE}}}}}:{{#ifeq:{{{subpages|1}}}|1|{{{rootpage|{{ROOTPAGENAME}}}}}/|}}{{{tab10}}}|<span style="color: #f8d8a8; text-decoration: inherit; -moz-text-decoration-color: #f8d8a8; text-decoration-color: #f8d8a8;">{{{tab10name|{{{tab10}}}}}}</span>]]</div>

Latest revision as of 21:45, 10 October 2021

Template Documentation view

This is the "PageTabs" template.

Note: This template's source code is based off of Genshin Impact Wiki's CustomTabs template. For documentation and more information, refer to the following link:

→ Source: Link to Genshin Impact Wiki's Template:CustomTabs

It should be called in the following format:

{{PageTabs
 |rootpage=
 |namespace=
 |subpages=
 |tab1=
 |tab2=
 |tab3=
 |tab4=
 |tab5=
 |tab6=
 }}
  • rootpage - title of root page if not using current page's root.
  • namespace - name of namespace if not using current page's namespace.
  • subpages - tabs are subpages of the first if set to 1, otherwise are not; default 1.
  • tab1 - title of first tab.
  • tab2, tab3, tab4, tab5, tab6, tab7, tab8, tab9, tab10 - title of subpage tabs.

This template can create up to ten page link tabs.

Examples

Example 1: Links within the same Namespace

{{PageTabs
|tab1=foo
|tab2=bar
|tab3=baz
}}

Example 2: Links with the same Rootpage

{{PageTabs
|rootpage=Blue Guardian Vetala
|namespace=
|tab1=Overview
|tab2=Dialogue
|tab3=Media
}}

Example 3: Links to Separate Pages

{{PageTabs
|namespace=
|subpages=0
|tab1=foo
|tab2=bar
|tab3=baz
}}