PHP Classes

MG's TreeView: Display list of elements of nested menus

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2012-09-22 (3 years ago) RSS 2.0 feedNot enough user ratingsTotal: 555 All time: 5,112 This week: 669Up
Version License PHP version Categories  
mg-tree-view 1.0Artistic License3.0HTML, PHP 5, Utilities and Tools
Description Author  

This class can display list of elements of nested menus.

It can take a list of one or more node elements to display as menu displayed as a HTML list. The list may have a special title heading.

The class uses CSS styles to customize the presentation of the title and the list elements.

Picture of Andrea Del Santo
Name: Andrea Del Santo <contact>
Classes: 1 package by
Country: Italy Italy
Age: 29
All time rank: 2901114 in Italy Italy
Week rank: 1468 Up60 in Italy Italy Up

To use the Tree View Control, just instance a new object with a string that
stands for the title:

$tree = new TreeView("The Title");

or initialize with an array:

$array = array("Node 1", array("Subnode 1", "Subnode 2"), "Node 2");
$tree = new TreeView("TheTitle");

to add later a node, just


to remove by querying the nodelist:

$tree->RemoveNode("Node 1");
  Files folder image Files  
File Role Description
Accessible without login Plain text file README.txt Doc. Read me with documentation
Plain text file TreeView.php Class The class file

 Version Control Unique User Downloads Download Rankings  
 0%Total:555All time:5,112
 This week:0This week:669Up
 User Comments (1)  
This is a very good and useful class ! lool
3 years ago (Josť Filipe Lopes Santos)