you would need to run the query yourself, but it's pretty easy. the output the tree expects is an array of objects in json format like the example below.
your table structure could be:
tree_node (id, title, parent_id)
you would select the root node, then it's children, recursively until the tree is complete.
function expandTree($node)
{
$result = array('text' => $node['title'], 'children' => array());
$nodes = getChildren($node); // query all nodes whose parent_id = $node['id']
foreach ($nodes as $node) {
$result['children'][] = expandTree($node);
}
return $result;
}
output format:
[
{
"text": "1. Pre Lunch (120 min)",
"expanded": true,
"classes": "important",
"children":
[
{
"text": "1.1 The State of the Powerdome (30 min)"
},
{
"text": "1.2 The Future of jQuery (30 min)"
},
{
"text": "1.2 jQuery UI - A step to richnessy (60 min)"
}
]
},
{
"text": "2. Lunch (60 min)"
},
[...]