BreadCrumbs-Extension

From Tech

Jump to: navigation, search

This is an implementation of a bread crumb trail navigation at the articles’ header. By Hans Musil and Roland Unger.

Contents

[edit] License

GPL.

[edit] Installing BreadCrumbs

Download from svn:mediawiki/trunk/extensions/BreadCrumbs/. Copy BreadCrumbs.php into the BreadCrumbs subfolder of the extensions folder of your MediaWiki installation. Then add the following line to your LocalSettings.php file (near the end):

 require_once( "$IP/extensions/BreadCrumbs/BreadCrumbs.php" );

The BreadCrumbs extension needs the CustomData extension as backend.

[edit] How it works

This extension provides a new MediaWiki function named "isin". It expects one argument, the name of the article where the current article "is in".

During parsing of the wiki markup, some few data related to the isin function's argument are generated and stored in the parser cache.

When the article is displayed, it's HTML code has to be build from the parser cache. The BreadCrumbs extension has a method triggered by the 'SkinTemplateOutputPageBeforeExec' hook. Here, the complete bread crumb trail is build up by starting with the article's own isin and retrieving subsequently higher level isin data from the corresponding parser caches. The HTML code of the bread crumb trail is added to the page's subtitle.

[edit] Older versions

This extension replaced BreadCrumbTrail extension, which used WvBreadcrumbs.php file.

[edit] Other BreadCrumbs

There is another BreadCrumb extension called "BreadCrumbs2" by Eric Hartwell. This is not version 2 of this extension, but a completely different thing with other goals.

Personal tools
Participation