I agree with Dave. One query, I have done something similar with modetp if not the same. To the one who had a copy please post, I don't have it anymore.
Basically you will need to use the tree_sortkey and tree_* plsql. Then sort by tree_sortkey. So the nodes will fall under properly.
Also its possible to it may be a union. Like getting the root sections. And then just getting the tree of your current context. Since some navigation seems to like to have the other nodes collapsed. Good Luck!