RE: [PEAR] re: TreeMenu and Recursive algorithms

From: Date: Sun, 13 Apr 2003 23:53:53 +0000
Subject: RE: [PEAR] re: TreeMenu and Recursive algorithms
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-143698@lists.php.net to get a copy of this message
I did as you suggested but still no links and the folder icons, I am still very confused about which option belong where as when using HTML_TreeMenu::createFromStructure the 'nodeOptions' dont seem to work ? see below... --snip-- // Tree $icon = "folder.gif"; $expanded_icon = "folder-expanded.gif"; $options = array('table' => 'categories', 'order' => 'category', 'columnNameMaps' => array('parentId' => 'predcessor', 'name' => 'category')); $tree = Tree::setupMemory('DBsimple', $dsn, $options); $tree->setup(); $node_options = array('text' => '', 'link' => "editCategory.php", 'icon' => $icon, 'expandedIcon' => $expanded_icon); $tree_options = array('defaultClass' => 'text', 'images' => 'images/tree/'); $_treeMenu = HTML_TreeMenu::createFromStructure(array('structure' => $tree, 'type' => 'kriesing', 'nodeOptions' => $node_options)); $treeMenu = new HTML_TreeMenu_DHTML($_treeMenu, $tree_options); --snip-- Thankyou for your help is appreciated, Joseph -----Original Message----- From: Demian Turner [mailto:demian@muse23.com] Sent: Friday, 11 April 2003 11:34 PM To: pear-general@lists.php.net Subject: Re: [PEAR] re: TreeMenu and Recursive algorithms Hi Joseph, > "Notice: Undefined index: text in > /usr/local/Zend/lib/php/HTML/TreeMenu.php on line 165", you could lower error reporting using error_reporting() if you don't want to modify TreeMenu() http://www.php.net/manual/en/function.error-reporting.php >also how would I > specify a link for each node which needs to pass the categorories id via the > url ? I've did this by changing line 631 in TreeMenu.php as follows: !empty($nodeObj->link) ? "'" . $nodeObj->link . $nodeObj->id .")'" : 'null', strangely this worked fine in v. 1.1.4, but something changed in 1.1.5, haven't had time to investigate. cheers, Demian -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#143698) next »