Extension:CSS MenuSidebar

This extension makes it possible to create additional sidebar elements as a menus with dropdown items.

This extension is inspired by Extension:CSS Dropdowns, and designed for MediaWiki 1.14 but should also work for later and some earlier versions. Please try it out and post your experiences here!


 * Forum:Sidebar Menus working now. CSS MenuSidebar updated for MediaWiki 1.16.x and Vector skin.

Download and Installation
Please copy the code found below and place it in. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Paste some menu structure in the MediaWiki:MenuSidebar. The basic behaviour is similar to the MediaWiki:Sidebar with three major differences:
 * 1) You can also use text-only entrys (no links), which is useful for menus with sub-menus
 * 2) You can switch on the parser to parse every list item in your menu. This results in a different syntax for all entrys (e.g.  and  around links) see Configuration
 * 3) Use "-" as list item to create a separator

below is an Example for the MediaWiki:MenuSidebar

Then copy the CSS found below and place it in your MediaWiki:Common.css. Be aware, that you have to change the css and put the titles of your menus instead of the example menu titles (#p-MyMenu instead of #p-Menu ...). I optimized the CSS with firefox 3.0, it also works on IE 8 and I tried to add some extra CSS for IE 7 but it's not what I would call perfect ;)

To activate the extension, add the following to LocalSettings.php:

Note: you may need to clear cache first before you can see the effect, if you have set $wgEnableSidebarCache = true; on the wiki.

Configuration
You can set the following parameter in your LocalSettings.php to enable the Parser for the individual list items in the menu. This enables you to put links to files etc. Be aware that you have to use a different syntax in the MediaWiki:MenuSidebar

Example
Example for  (Default)
 * Menu 1
 * Submenu 1.1|Submenu 1.1
 * Item 1.1.1|Item 1.1.1
 * Item 1.1.2|Item 1.1.2
 * Submenu 1.2|Submenu 1.2
 * Another Menu
 * not a link
 * Item 2.1.1|An Item
 * bla|still a deeper level

Example for
 * Menu 1
 * Submenu 1.1
 * Item 1.1.1
 * Item 1.1.2
 * Submenu 1.2
 * Another Menu
 * not a link
 * An Item
 * still a deeper level
 * [[Media:bla|also Files are possible]]

MediaWiki 1.17 and Vector
To make this extension work on MediaWiki 1.17.x and 1.18.x, add the following to MediaWiki:Vector.css:

/* keep nested list fonts from continually decreasing in size with each nesting */ font-size: small !important; }
 * 1) mw-panel div.portal div.body ul li {

/* Allow popup submenus to overflow the sidebar area */ overflow: visible !important; }
 * 1) mw-panel div.portal div.body ul li {

/* minor adjustments to the sidebar area for the Vector skin */ .menuSidebar ul div { top: -1px !important; /* vertical offset of submenus */ }

.menuSidebar ul { width: 8em; /* width of main menu */ }