Simple example


require_once 'HTML/TreeMenu.php';

$menu_styles      = new HTML_TreeNode(array('text'=>'Styles'));
$menu_pays        = new HTML_TreeNode(array('text'=>'Countries'));
$menu_restaurants = new HTML_TreeNode(array('text'=>'Restaurants'));
$menu_plats       = new HTML_TreeNode(array('text'=>'Menus'));

for (
$i 1$i 10$i++) {
HTML_TreeNode(array('icon'=>'folder.gif''text' => "Style #$i"))
HTML_TreeNode(array('icon'=>'folder.gif''text' => "Country #$i"))
HTML_TreeNode(array('icon'=>'folder.gif''text' => "Restaurant #$i"))
HTML_TreeNode(array('icon'=>'folder.gif''text' => "Menu #$i"))

$menu  = new HTML_TreeMenu();

// Chose a generator. You can generate DHTML or a Listbox
$tree = new HTML_TreeMenu_DHTML($menu);


Installing the files (Previous) Tree-construction methods (Next)
Last updated: Tue, 13 Oct 2015 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.