HTML_Menu problem

From: Date: Mon, 28 Jun 2004 14:43:01 +0000
Subject: HTML_Menu problem
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13374@lists.php.net to get a copy of this message
Hi, I tried the HTML_menu example from the End-user documentation, but it seems I have a problem with most displays. Indeed, only the 'sitemap' works. When trying the 'tree' view, only the first level is displayed, even after I click on a link in the menu. Here is the test code. I changed the URLS so as to point to an existing file... With 'sitemap' view, the menu is fully displayed Do I need something special? sessions? cache? How does the HTML_menu get track of the current menu item to display sub menus? Thank you, Vincent <?php $data = array( 1 => array( 'title' => 'Menu item 1', 'url' => '/test/html_menu_test.php?sdfg=dslk', 'sub' => array( 11 => array( 'title' => 'Menu item 1.1', 'url' => '/test/html_menu_test.php?a=11' ), 12 => array( 'title' => 'Menu item 1.2', 'url' => '/test/html_menu_test.php?a=12&b=0', 'sub' => array( 121 => array('title' => 'Menu item 1.2.1', 'url' => '/test/html_menu_test.php?a=12&b=1'), 122 => array('title' => 'Menu item 1.2.2', 'url' => '/test/html_menu_test.php?a=12&b=2') ) ) ) ), 2 => array( 'title' => 'Menu item 2', 'url' => '/test/html_menu_test.php?a=2', 'sub' => array( 21 => array('title' => 'Menu item 2.1', 'url' => '/test/html_menu_test.php?a=21'), 22 => array('title' => 'Menu item 2.2', 'url' => '/test/html_menu_test.phpa=22') ) ) ); require_once("html/Menu.php"); $menu = new HTML_Menu($data, 'tree'); $output .= $menu->get(); print($output); ?>

« previous php.pear.general (#13374) next »