Let's build a full tree of all categories:
Get the tree downwards
PHP
$d=Data::cache("categories", "tree", "down");$d->setValue("catnr", 0); //set category reference the top level
if($d->get())
while($d->next())
print str_repeat(" ", $d->v["treedepth"]." -".$d->v["name"]; //print out the names of all categories, indented based on it's depth in the tree
So what about a crumb-trail?
Get the tree upwards
PHP
$d=Data::cache("categories", "tree", "up");$d->setValue("catnr", 123); //set category reference start level
if($d->get())
while($d->next())
print $d->v["name"]." / "; //print out the names of all categories "above" (and include) #123