Template
Pagetabs
From Dogcraft Wiki
m (mobile overflow) |
mNo edit summary |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly>{{#ifeq: {{NAMESPACE}} | {{ns:Template}} | {{#ifeq: {{#sub:{{ROOTPAGENAME}}|0|3}} | Tab | [[Category:Tabs]] |}} |}}<templatestyles src="Pagetabs/styles.css" /><div class="pagetabs noexcerpt noscrollbar" {{#if:{{{styles|}}}|style="{{{styles}}}|}} ><!-- | ||
<div class="pagetabs noexcerpt" style=" | |||
--><div>[[{{{tab1|}}}|{{{title1|{{{tab1|}}}}}}]]</div><!-- | --><div>[[{{{tab1|}}}|{{{title1|{{{tab1|}}}}}}]]</div><!-- | ||
--><div>[[{{{tab2|}}}|{{{title2|{{{tab2|}}}}}}]]</div><!-- | --><div>[[{{{tab2|}}}|{{{title2|{{{tab2|}}}}}}]]</div><!-- | ||
Line 6: | Line 5: | ||
-->{{#if:{{{tab4|}}}|<div>[[{{{tab4|}}}|{{{title4|{{{tab4|}}}}}}]]</div>}}<!-- | -->{{#if:{{{tab4|}}}|<div>[[{{{tab4|}}}|{{{title4|{{{tab4|}}}}}}]]</div>}}<!-- | ||
-->{{#if:{{{tab5|}}}|<div>[[{{{tab5|}}}|{{{title5|{{{tab5|}}}}}}]]</div>}}<!-- | -->{{#if:{{{tab5|}}}|<div>[[{{{tab5|}}}|{{{title5|{{{tab5|}}}}}}]]</div>}}<!-- | ||
-->{{#if:{{{tab6|}}}|<div>[[{{{tab6|}}}|{{{title6|{{{tab6|}}}}}}]]</div>}}<!-- | |||
--></div> | --></div> | ||
<hr style= | <hr /> | ||
<!-- moved to Template:Tab Userpage <div class="pagetabsmore">{{Pagetabs/pagetabsmore|username=|style=position:absolute; bottom:24px;}}</div> --></includeonly><noinclude> | |||
{{TemplateStyles}} | |||
==Pagetabs template== | ==Pagetabs template== | ||
This template was originally created for use on user pages. | This template was originally created for use on user pages. | ||
This template creates a row of at most | This template creates a row of at most 6 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. | 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. | If a title field is left blank, the associated tab (link) field will be included instead. | ||
Line 108: | Line 110: | ||
"label": "Title 5", | "label": "Title 5", | ||
"description": "Title text of the fifth tab.", | "description": "Title text of the fifth tab.", | ||
"example": "Main page", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"tab6": { | |||
"label": "Tab 6", | |||
"description": "Link to the target page of the sixth tab. May be a page name, interwiki-prefixed page name or a magic name variable.", | |||
"example": "Main_Page, {{FULLPAGENAME}}, dc:Announcements", | |||
"type": "wiki-page-name", | |||
"suggested": true | |||
}, | |||
"title6": { | |||
"label": "Title 6", | |||
"description": "Title text of the sixth tab.", | |||
"example": "Main page", | "example": "Main page", | ||
"type": "string", | "type": "string", | ||
Line 113: | Line 129: | ||
} | } | ||
}, | }, | ||
"description": "This template creates a row of at most | "description": "This template creates a row of at most 6 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.", | ||
"format": "block" | "format": "block" | ||
} | } | ||
</templatedata> | </templatedata> | ||
{{Interface template}} [[Category:Tabs]] | |||
</noinclude> | </noinclude> |
Latest revision as of 13:16, 4 December 2023
This template uses TemplateStyles: |
Pagetabs template
This template was originally created for use on user pages.
This template creates a row of at most 6 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 6 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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Tab 1 | tab1 | Link to the target page of the first tab. May be a page name, interwiki-prefixed page name or a magic name variable.
| Page name | required |
Title 1 | title1 | Title text of the first tab.
| String | suggested |
Tab 2 | tab2 | Link to the target page of the second tab. May be a page name, interwiki-prefixed page name or a magic name variable.
| Page name | required |
Title 2 | title2 | Title text of the second tab.
| String | suggested |
Tab 3 | tab3 | Link to the target page of the third tab. May be a page name, interwiki-prefixed page name or a magic name variable.
| Page name | suggested |
Title 3 | title3 | Title text of the third tab.
| String | suggested |
Tab 4 | tab4 | Link to the target page of the fourth tab. May be a page name, interwiki-prefixed page name or a magic name variable.
| Page name | suggested |
Title 4 | title4 | Title text of the fourth tab.
| String | suggested |
Tab 5 | tab5 | Link to the target page of the fifth tab. May be a page name, interwiki-prefixed page name or a magic name variable.
| Page name | suggested |
Title 5 | title5 | Title text of the fifth tab.
| String | suggested |
Tab 6 | tab6 | Link to the target page of the sixth tab. May be a page name, interwiki-prefixed page name or a magic name variable.
| Page name | suggested |
Title 6 | title6 | Title text of the sixth tab.
| String | suggested |