Extension:YAMBE

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
YAMBE (Yet Another MediaWiki Breadcrumb Extension)

Release status: stable

Implementation Tag, Hook
Description Hierarchical Breadcrumb for Mediawiki. Builds a structured path for each page.
Author(s) Ian Coleman (QuantumTigertalk)
Latest version 0.2.2 (29 Aug 2011)
MediaWiki 1.13.1, 1.14.0, 1.15.0, 1.16.0 and 1.17.0
License GPL
Download YAMBE Code
Overview Documentation
Hooks used
EditFormPreloadText

Translate the YAMBE extension if possible

Check usage and version matrix; code metrics

What can this extension do?[edit | edit source]

Creates a hierarchical breadcrumb (navigation path) for a MediaWiki page based on the page that it was created from. Allows users to track back through the wiki more easily and provides a context for the current page.

Whenever a new page is created beneath a page which already uses YAMBE a piece of markup is inserted at the start of the page to set up YAMBE and identify the page's parent. When the page is displayed this is used to build links to the parent page looping through each parent until it gets to the top of the tree.

YAMBE differs from many of the other MediaWiki breadcrumb extensions in that it allows the wiki structure (and the author) to control the breadcrumb that the user sees, rather than displaying the user's progress through the wiki.

Stability[edit | edit source]

The latest version (0.2.2) has been tested and appears stable on MediaWiki versions 1.15.0 and 1.16.0. The 0.2.0 update fixed an instability identified whilst testing version 0.1.5 with the MediaWiki 1.17.0 alpha.

Usage[edit | edit source]

Tags are auto-generated when creating a new page, but may be edited to change the details in the breadcrumb if required.

<yambe:breadcrumb self="Self Text">Parent Page|Parent Text</yambe:breadcrumb>
  • Self Text is the text to display at the end of the breadcrumb for the current page. Defaults to page name if blank
  • Parent Page is the name of the parent page
  • Parent Text is the text to display in the breadcrumb for the parent

Download instructions[edit | edit source]

The Code is in Google Code, as are the configuration instructions

Configuration parameters[edit | edit source]

//Some global config declarations
// where to split the URL to find page name. Usually either /index.php/ or /wiki/
$URLSplit = "/index.php/"; 
$bcDelim = " > "; // Character to mark the stages of the breadcrumb?
$maxCountBack = 5; // Maximum number of links in breadcrumb 
$overflowPre = "[...]"; // Prefix if breadcrumb is longer than $maxCountBack links

The above variables can be changed to customise how YAMBE creates the breadcrumb and the maximum depth it supports.

See also[edit | edit source]