Configuring yambe breadcrumbs extension for mediawiki

From Notes_Wiki

Home > CentOS > CentOS 6.x > Web based tools or applications > Mediawiki configuration > Configuring yambe breadcrumbs extension for mediawiki

This no longer works with latest wiki. Hence manually specifying links from parent to child as is done on this page is better in long run.

To configure yambe breadcrumbs extension for mediawiki use following steps:

  1. Create a folder named 'yambe' in 'extensions' folder
  2. Get code for 'yambe.php' from http://code.google.com/p/yambe/source/browse/trunk/yambe.php and save it as yambe.php in yambe folder.
    Raw code is available at http://yambe.googlecode.com/svn/trunk/yambe.php
  3. Edit yambe.php and set
    $URLSplit = "/index.php/";
    in most cases URL is split with index.php and not with wiki. Read yambe documentation to understand what this parameter is about.
  4. Add following lines to 'LocalSettings.php' file
    #Enable yambe Breadcrumbs extension
    require_once("extensions/yambe/yambe.php");
  5. Add following line to mediawiki code of Main Page, preferably at top where you want breadcrumbs to appear
    <yambe:breadcrumb self="Home"/>
    Replace "Home" with suitable name for Main Page, such as "Main Page", "/" etc., if required
  6. For all pages inside "Main Page" or "Home" use following to indicate to yambe that the page is child page of "Main Page"
    <yambe:breadcrumb self="<Child Page Title>"><Parent Page> | <Parent Page Title></yambe:breadcrumb>
    Here, <Child Page Title> should be replaced by title of child page, <Parent Page> should be replaced by name of parent page as per wiki and <Parent Page Title> should be replaced by title to be displayed for Parent Page. For Example
    <yambe:breadcrumb self="About wiki">Main Page|Home</yambe:breadcrumb>
    Note that:
    • Specifying value for self attribute is optional. In case value is not present then title of the page is displayed as the part of breadcrumbs.
    • Parent page should be specified by exact case. The yambe breadcrumbs plugin is case sensitive, even if mediawiki is not.
  7. Try the same for child page of child page to understand the process properly.


Note that for the new pages the yambe extension displays the yambe breadcrumb automatically at top. Hence the manual addition of tags has to be done only for existing pages of wiki while migrating / shifting to use of yambe breadcrumbs plugin.


<yambe:breadcrumb self="Configuring yambe breadcrumbs extension for mediawiki">Mediawiki configuration|Mediawiki configuration</yambe:breadcrumb>

We can edit mediawiki page content using scripts to configure yambe on a new installation using:

php maintenance/getText.php "Main Page" > main_page.txt
echo '<yambe:breadcrumb self="Home"/>' > yambe.txt
cat yambe.txt main_page.txt > main_page2.txt
php maintenance/edit.php -s "Adding yambe config line" -m 'Main Page' < main_page2.txt
rm -f main_page.txt yambe.txt main_page2.txt

More information on editing pages using maintenance script can be found at http://www.mediawiki.org/wiki/Manual:Edit.php



Home > CentOS > CentOS 6.x > Web based tools or applications > Mediawiki configuration > Configuring yambe breadcrumbs extension for mediawiki