function makelist($album,$level){
//print out the list item
?>
-
= str_repeat(" ", $level) ?>= html::purify($album->title) ?>
//recurse over the children, and print their list items as well
foreach ($album->viewable()->children(null, null, array(array("type", "=", "album"))) as $child){
makelist($child,$level+1);
}
}
makelist($root,0);
?>