Template:SubpageNav
More actions
SubpageNav
A compact, minimal horizontal navigation bar. Works on root pages and any depth of subpage. Auto-populates all subpages with full dropdown support for nested paths.
Basic Usage
Drop this at the top of any project or tutorial page:
{{SubpageNav}}
Works on the root page and any subpage depth. On Example Project/About/More Details the nav correctly shows Example Project as the brand and lists all of its subpages.
With an Icon
{{SubpageNav|icon=emotes-face-smile-big}}
Manual List
Pass a bulleted wikitext list as the first parameter. Nesting with ** creates dropdown menus:
{{SubpageNav|
* [[My Project/Overview|Overview]]
** [[My Project/Overview/Details|Details]]
* [[My Project/Gallery|Gallery]]
}}
Parameters
1- Optional manual wikitext list. If omitted, auto-populates via Special:PrefixIndex.
icon- Icon filename without
File:prefix or.pngextension. root- Override the root page (defaults to
SubpageNav). name- Override the brand label in the nav bar.
Technical Notes
- Styles: Template:SubpageNav/styles.css
- Dropdown & nesting: MediaWiki:Gadget-subpagenav.js
Adds a compact horizontal subpage navigation bar. Auto-detects all subpages and builds dropdown menus for nested paths. Works correctly from any depth of subpage.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Manual link list | 1 | Optional. A bulleted wikitext list of links. Nesting with ** creates dropdown menus. If omitted, subpages are auto-detected. | Content | optional |
| Icon | icon | Icon filename without File: prefix or .png extension (e.g. emotes-face-smile-big). | String | optional |
| Root page | root | Override the root page used for the brand link and subpage lookup. Defaults to {{ROOTPAGENAME}}. | Page name | optional |
| Display name | name | Override the brand label shown in the nav bar. Defaults to the root page name. | String | optional |