Extension:TreeAndMenu

This extension is a single article or file which you can get from Tree-view.php and snippet of code to be included in your LocalSettings.php script which executes the code in the article or file. It's only been tested on version 1.6.7, and is being maintained in Tree view. It allows tree-views to be created by surrounding a normal nested bullet list within a div tag as folows:
 * &lt;div class="tree-view">.

The tree-view code is designed for a slightly different MediaWiki environment, but the following wrapper code inserted into your LocalSettings.php file allows it to work in a standard MediaWiki 1.6.x environment: $treeviewImages = array(	'plus'  => '/wiki/images/3/36/Arrow-closed.png',	'minus'  => '/wiki/images/d/df/Arrow-open.png',	'opened' => '/wiki/images/5/58/Folder_opn_sml_blu.gif',	'closed' => '/wiki/images/3/37/Folder_sml_blu.gif',	'doc'    => '/wiki/images/e/e3/Doc-icon.gif',	'spacer' => '/wiki/images/9/92/Spacer.png'	);

$tmp = new Article(Title::newFromText('tree-view.php')); $treeviewCode = '?>'.$tmp->fetchContent(0,false,false).'<?';
 * 1) If your treeview code is a file instead of an article,
 * 2) then change these two lines to include('tree-view.php')

$wgHooks['ParserBeforeStrip'][] = 'treeviewData'; function treeviewData(&$parser,&$article) { $event = 'data'; eval($GLOBALS['treeviewCode']); return true; }

$wgHooks['ParserAfterTidy'][] = 'treeviewView'; function treeviewView(&$parser,&$article) { $article = " $article"; $event = 'view'; eval($GLOBALS['treeviewCode']); $article = str_replace(' ','',$article); return true; }

Note: The code above requires that the tree-view.php code is in an article of the same name in your wiki. You can use a file but must change the commented lines above to an include statement.

Images
The images the tree-view uses are defined a the $treeviewImages global variable, opened and closed folder images and a document (leaf node) image are required, as well as plus and minus images to click on to open or close the folders. Also a spacer image is required which is just a single pixel transparent image used for layout. You can create your own images, or use our ones which are listed in OrganicDesign:Category:Tree view images.