Template

Pagetabs

From Dogcraft Wiki

No edit summary
m (mobile overflow)
Line 1: Line 1:
<includeonly>
<includeonly>
<div class="pagetabs noexcerpt" style="display:flex; justify-content:space-around; width: 100%; margin:1.5em 0px 5px 0px; font-weight: bold; gap:3px; flex-wrap:wrap;"><!--
<div class="pagetabs noexcerpt" style="display:flex; justify-content:space-around; min-width: 100%; margin:1.5em 0px 5px 0px; font-weight: bold; gap:7px; flex-wrap:nowrap; overflow:auto; white-space:nowrap; max-height:2em;"><!--
--><div>[[{{{tab1|}}}|{{{title1|{{{tab1|}}}}}}]]</div><!--
--><div>[[{{{tab1|}}}|{{{title1|{{{tab1|}}}}}}]]</div><!--
--><div>[[{{{tab2|}}}|{{{title2|{{{tab2|}}}}}}]]</div><!--
--><div>[[{{{tab2|}}}|{{{title2|{{{tab2|}}}}}}]]</div><!--

Revision as of 16:09, 2 July 2022

Pagetabs template

This template was originally created for use on user pages.


This template creates a row of at most 5 tabs with (internal) links, meant to ease navigation between related and sub-pages. External links may only be included trough interwiki prefixes. The current page should also be included as a tab to maintain navigation in all directions. Tabs left blank are excluded. The first 2 tabs are required. If a title field is left blank, the associated tab (link) field will be included instead.


The implementation of this template was in part inspired by the Hollow Knight wiki's Template:Navbar.

Example

{{pagetabs
|tab1     = {{FULLPAGENAME}}
|title1   = Pagetabs
|tab2     = dc:Announcements
|title2   = Announcements
|tab3     = Special:History/{{FULLPAGENAME}}
|title3   = History
|tab5     = Main Page
}}

generates:


Template Data

This template creates a row of at most 5 tabs with (internal) links, meant to ease navigation between related and sub-pages. External links may only be included trough interwiki prefixes. The current page should also be included as a tab to maintain navigation in all directions. Blank tabs are excluded.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Tab 1tab1

Link to the target page of the first tab. May be a page name, interwiki-prefixed page name or a magic name variable.

Example
Main_Page, {{FULLPAGENAME}}, dc:Announcements
Page namerequired
Title 1title1

Title text of the first tab.

Example
Main page
Stringsuggested
Tab 2tab2

Link to the target page of the second tab. May be a page name, interwiki-prefixed page name or a magic name variable.

Example
Main_Page, {{FULLPAGENAME}}, dc:Announcements
Page namerequired
Title 2title2

Title text of the second tab.

Example
Main page
Stringsuggested
Tab 3tab3

Link to the target page of the third tab. May be a page name, interwiki-prefixed page name or a magic name variable.

Example
Main_Page, {{FULLPAGENAME}}, dc:Announcements
Page namesuggested
Title 3title3

Title text of the third tab.

Example
Main page
Stringsuggested
Tab 4tab4

Link to the target page of the fourth tab. May be a page name, interwiki-prefixed page name or a magic name variable.

Example
Main_Page, {{FULLPAGENAME}}, dc:Announcements
Page namesuggested
Title 4title4

Title text of the fourth tab.

Example
Main page
Stringsuggested
Tab 5tab5

Link to the target page of the fifth tab. May be a page name, interwiki-prefixed page name or a magic name variable.

Example
Main_Page, {{FULLPAGENAME}}, dc:Announcements
Page namesuggested
Title 5title5

Title text of the fifth tab.

Example
Main page
Stringsuggested
This page was last modified on 2 July 2022, at 16:09. (11 months ago)
Background Valentine's Day Event 2024 by TheWhiteTigerNL