Adding tooltips to sidebar items in MediaWiki

The MediaWiki logo

I am one of the main forces behind a wiki-project intended for the local phd-population. During the course of managing that, I discovered that it is quite a different procedure to add mouse-over text to the items in the side-bar than pretty much anywhere else on the site. Also, I was unable to google the problem. Hopefully this post will make that easier.

It turns out that the procedure is the following (quite simple once you know it): 

create a page called:

MediaWiki:Tooltip-n-The-Exact-Title-As-It-Appears-In-the-Sidebar

, and put the tooltip in that.

So, for instance, if you have an item called “Main Page”, as people often do, the tootltip is hidden inside MediaWiki:Tooltip-n-Main-Page. It is important to have the correct capitalisation in the item name, MediaWiki:Tooltip-n-main-page is not going to work. Note that if you change the wording in the sidebar, even if the link is still pointing to the same page, the tooltip will disappear (and the above created page will just be junk).

For completeness, I should say that our wiki is MediaWiki version 1.17.0, though I think this solution will work on all versions.

At the end, I need to thank the kind people on the mediawiki mailinglist for explaining this to me 🙂