true, 'icon' => 'folder' )); case 'file': return array_merge(parent::itemProps($itemId), array( 'inode' => false, 'icon' => 'file' )); } return parent::itemProps($itemId); } } $hugeTree = new HugeTree(); // what branch was requested? $branch = isset($_GET['branch']) ? $_GET['branch'] : null; //$hugeTree->json($branch); // this will load the entire tree (comment above and uncomment this) $hugeTree->json($branch, true); // note: for large and complex tree structures // probably the best way to do things is to return the first 2-3 levels // starting from the requested branch instead of returning the entire tree