MediaWiki navigation links: Uh, wtf?

11/10/07 UPDATE: Please see Nasser’s updated information on editing MediaWiki sidebar links. My post below is pretty old.


I’m pretty sure the entire purpose of a wiki is to take the hassle factor out of documentation. At work, I’ve been using TWiki pretty effectively, so I decided to use a Dreamhost 1-click install to put MediaWiki on a personal website to do some documentation. I figured that the documentation would virtually slide out of my brain, through my fingertips, and into the Intarweb.

Then I wanted to get fancy. I wanted to change the main navigation links of MediaWiki. Bad idea.

Didn’t think this would be such a big deal, you know? Because wikis are super collaborative tools and you can edit anything with just a click, right? An article on the World Wide Web told me so…

A Wiki is a collaboratively edited Web site designed to promote the accumulation and refining of data with the least possible hassle. Any user viewing a Wiki can edit anything they see quickly and easily.

So I did some Googling and the instructions for changing the navigation links in MediaWiki. Hmm. This is not “click to edit.” But I persevered.

For going on an hour I tried the left navigation. I wanted to add a single link. I failed. Miserably. And I’m not too n00bish, so I’m going to blame the documentation, which was probably collaboratively written (in true wiki fashion) by 47 different people. That’s okay. It’s free, and I can’t really complain. I do wish writers of instructions would follow the Minto Pyramid Principle, however.

My workaround

On the off chance that you’re here because you actually want to modify your wiki’s navigation links (and not just read my complaining), I recommend that you modify the existing MediaWiki URLs and not try to create new ones. That’s what I did. Simple instructions:

  1. Go to Special:Allmessages.
  2. Choose a link you’ll modify. I decided I didn’t want the “Community portal” link, so that meant I would modify the:
    • portal page [MediaWiki:portal] (do an in-page find on the Special:Allmessages page). Modify the existing text to change what will be rendered in the menu as the link text.
    • portal-url page [MediaWiki:portal-url]. Modify the existing text to change what will be rendered in the menu as the link URL (can be internal wiki page or external URL).
  3. After you’ve edited, make sure to do a full-refresh of your the page or clear your browser cache. MediaWiki is very finicky about this.

Remember, you have the choice of any of the existing links to modify. Here they are:

link text link URL
mainpage mainpage
portal portal-url
currentevents currentevents-url
recentchanges recentchanges-url
randompage randompage-url
help helppage
sitesupport sitesupport-url

Even though the pages I modified were “portal” and “portal-url,” they now have nothing to do with that topic. Those are simply the references in the database.

42 Responses to “MediaWiki navigation links: Uh, wtf?”

Pages: « 1 [2]

  1. 31
    Sting Tao Says:

    I’ve spent a week trying to solve this for 1.10. The replies look helpful to me. I’ll try and report later. The difference is that I am dealing with Traditional Chinese and Simplified Chinese version of Wikipedia….The menu bar somehow differs a bit.

  2. 32
    MikeFM Says:

    Myself, I wish they’d just make it as simple as editing chunks of HTML on my server. Messing around with setting files or editing the site layout from the site is a pain.

  3. 33
    Yulian Stefanov Says:

    It have easy way.
    Just go goto serch area, type “Mediawiki:sidebar” then edit the page and delete/replace/add whatever.

  4. 34
    Jim Says:

    Yulian Stefanov is awesome, that suggestion works great!
    - Jim

  5. 35
    Deep Says:

    Navigate to this page in your mediawiki, and edit the above shown parameters, simple is that.

    http://www.example.com/wiki/index.php/MediaWiki:Sidebar

  6. 36
    Mike Says:

    I’d love to leave a comment… but I can’t right now.

    I still love the wiki though… what better alternative is there?

  7. 37
    io Says:

    [[MediaWiki:Sidebar]] kaman now yo

  8. 38
    joost Says:

    This won’t work on MediaWiki 1.11.1. When I navigate to link/search for MediaWiki:Sidebar EDIT link is missing from this page and I can’t edit it for some reason.

  9. 39
    Yvo van Doorn Says:

    joost… give yourself sysop rights. I had to write a mysql statement to give myself rights. Below are the instructions. Replace the items with in the greater then / less then signs. Use at your own risk, I am assuming you have the knowledge to do this.

    mysql -u -p
    use ;
    INSERT INTO user_groups (ug_user, ug_group) VALUES (”, ‘bureaucrat’);
    INSERT INTO user_groups (ug_user, ug_group) VALUES (”, ’sysop’);

  10. 40
    Yvo van Doorn Says:

    Hated the greater then / less then signs. Here is my second try using stars this time:
    mysql -u *mysqluser* -p*password*
    use *yourwikidb*;
    INSERT INTO user_groups (ug_user, ug_group) VALUES (’*YOURUSERID*’, ‘bureaucrat’);
    INSERT INTO user_groups (ug_user, ug_group) VALUES (’*YOURUSERID*’, ’sysop’);

  11. 41
    Rob Pierson Says:

    be sure to use the same formatting as you see on the page, otherwise your additions won’t show up.

  12. 42
    Adverick Says:

    I had the same issue with the dreamhost installation of wikimedia: The solution is simply, try:

    http://www.example.com/wiki/index.php?title=MediaWiki:Sidebar

    Sorry my english. bye.

Pages: « 1 [2]

Leave a Reply

or Login for hassle-free commenting.

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>