in Tools

Add a breadcrumb to your MediaWiki articles

MediaWiki is a very powerful and flexible tool to create complete documentation for your products. Unfortunately, the navigation is not always end-user-friendly, expecially if you try to structure your wiki hierarchically.

The most convenient way to navigate inside a hierarchical content is to have a breadcrumb on the top of the page to reach the parent articles. Unfortunately, in the manner of any website, MediaWiki does not provide native hierarchical organization. You have to make it by yourself using appropriate linking between the pages. If you want a breadcrumb, you have to hard-code it on every page which is a pain, especially when you want to move a page into another branch of your hierarchical tree.

It’s why I developed my own breadcrumb extension : Simple Breadcrumb. With this extension, all you need to do is to insert breadcrumb tag to set a parent page for the current one.

{{#breadcrumb: Parent_Page | Parent }}

The resulting breadcrumb is displayed under the page title.

The tag can be used in templates and accepts variables.

{{#breadcrumb: Category:Releases {{{product}}} | {{{product}}} }}

For more information about installation, configuration and usage of the extension, go to the Simple breadcrumb extension page. This extension is under LGPL license so feel free to use it in your projects and improve it!