A MediaWiki extension that automatically adds a custom sidebar menu to any namespace by reading a designated wiki page.
- MediaWiki 1.42 or later
- Vector or Vector 2022 skin
- Clone or extract the extension into your
extensions/directory asCustomNameSpaceSidebar. - Add the following to
LocalSettings.php:
wfLoadExtension( 'CustomNameSpaceSidebar' );
$wgCustomNameSpaceSidebar = true;| Variable | Default | Description |
|---|---|---|
$wgCustomNameSpaceSidebar |
false |
Set to true to enable the extension |
Create a wiki page named WebLeftBar in any namespace to define the sidebar for that namespace. For a page in the Foo: namespace, create Foo:WebLeftBar. For the main namespace, create WebLeftBar.
Sections are defined with **Section Title** and list items with * . Both internal and external links are supported.
**Section One**
* [[Some Page]]
* [[Some Page|Custom Label]]
**Section Two**
* [https://example.com External Site]
Each section renders as a collapsible block in the sidebar.
MIT