- a file-based example with a PHP Tree Menu</b> </div> </div> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20%" valign="top"> <div class="normalbox"> <div class="normal"> PHP Tree Menu </div> <?php require_once 'lib/PHPLIB.php'; require_once 'lib/layersmenu-common.inc.php'; require_once 'lib/phptreemenu.inc.php'; $mid = new PHPTreeMenu(); //$mid->setDirroot('./'); ////$mid->setImgdir('./menuimages/'); //$mid->setImgwww('menuimages/'); ////$mid->setIcondir('./menuicons/'); //$mid->setIconwww('menuicons/'); $mid->setMenuStructureFile('layersmenu-vertical-1.txt'); $mid->setPHPTreeMenuDefaultExpansion('2|3|6'); $mid->setIconsize(16, 16); $mid->parseStructureForMenu('treemenu1'); //$mid->setSelectedItemByCount('treemenu1', 7); $mid->setSelectedItemByUrl('treemenu1', basename(__FILE__)); print $mid->newPHPTreeMenu('treemenu1'); /* alternatively: $mid->newPHPTreeMenu('treemenu1'); $mid->printPHPTreeMenu('treemenu1');
<?php include "lib/treemenu.inc.php"; $treemid = new TreeMenu(); $treemid->setMenuStructureFile("layersmenu-vertical-1.txt"); $treemid->parseStructureForMenu("treemenu1"); print $treemid->newTreeMenu("treemenu1"); ?> </div> <div class="normalbox"> <div class="normal"> PHP Tree - No JavaScript </div> <?php include "lib/phptreemenu.inc.php"; $phptreemid = new PHPTreeMenu(); $phptreemid->setPHPTreeMenuDefaultExpansion("3|4|18"); $phptreemid->setMenuStructureFile("layersmenu-vertical-1.txt"); $phptreemid->parseStructureForMenu("treemenu1"); print $phptreemid->newPHPTreeMenu("treemenu1"); ?> </div> <div class="normalbox"> <div class="normal"> Plain - No JavaScript </div> </div> <center> <?php include "lib/plainmenu.inc.php";
$treemid->setIconsize(16, 16); $treemid->parseStructureForMenu('treemenu1'); //$treemid->setTreeMenuTheme(''); //$treemid->setSelectedItemByCount('treemenu1', 1); $treemid->setSelectedItemByUrl('treemenu1', basename(__FILE__)); print $treemid->newTreeMenu('treemenu1'); ?> </div> <div class="normalbox"> <div class="normal"> PHP Tree - No JavaScript </div> <?php require_once 'lib/phptreemenu.inc.php'; $phptreemid = new PHPTreeMenu(); $phptreemid->setMenuStructureFile('layersmenu-vertical-1.txt'); $phptreemid->setPHPTreeMenuDefaultExpansion('2|3|6'); $phptreemid->setIconsize(16, 16); $phptreemid->parseStructureForMenu('treemenu1'); $phptreemid->setPHPTreeMenuTheme('nautilus_'); ////$treemid->setSelectedItemByCount('treemenu1', 1); //$phptreemid->setSelectedItemByUrl('treemenu1', basename(__FILE__)); print $phptreemid->newPHPTreeMenu('treemenu1'); ?> </div> <div class="normalbox"> <div class="normal"> Plain - No JavaScript </div>