Hi David,
I am sorry I am little time right now. But the basic query is like this.
select i.item_id,
i.name,
i.parent_id,
tree_level(i.tree_sortkey) as level,
tree_level(p.tree_sortkey) as parent_level,
from cr_items i,
(select item_id, tree_sortkey from cr_items where item_id = :parent_id) p
where
and i.tree_sortkey between p.tree_sortkey and tree_right(p.tree_sortkey)
order by i.tree_sortkey
That should display a subtree of CR. Take note that tree_sortkey is not a CR issue. Its the way oacs was ported in pg.
I think Rob added a table to make the navigation. When I was working on modetp, I simply had rules and derived the navigation from it. Rob made a table to explicitly put which items are in navigation or not.