Index: openacs.org-dev/packages/cms/www/modules/templates/template-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/cms/www/modules/templates/template-postgresql.xql,v diff -u -r1.1.1.1 -r1.1.1.2 --- openacs.org-dev/packages/cms/www/modules/templates/template-postgresql.xql 9 Jul 2002 17:35:04 -0000 1.1.1.1 +++ openacs.org-dev/packages/cms/www/modules/templates/template-postgresql.xql 8 Oct 2002 15:47:03 -0000 1.1.1.2 @@ -35,5 +35,29 @@ + + + +select + t.tree_level, t.context_id, content_item__get_title(t.context_id) as title + from ( + select + context_id, tree_level(tree_sortkey) as tree_level + from + acs_objects o1, (select tree_ancestor_keys(select tree_sorkey + from acs_objects + where object_id = :template_id) as tree_sortkey) parents + where + context_id <> 0 + and + o1.tree_sortkey = parents.tree_sortkey + ) t, cr_items i + where + i.item_id = t.context_id + order by + tree_level desc + + +