Index: openacs-4/packages/categories/tcl/category-trees-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/tcl/category-trees-procs.tcl,v diff -u -r1.20.2.1 -r1.20.2.2 --- openacs-4/packages/categories/tcl/category-trees-procs.tcl 27 May 2007 19:40:24 -0000 1.20.2.1 +++ openacs-4/packages/categories/tcl/category-trees-procs.tcl 31 May 2007 10:03:53 -0000 1.20.2.2 @@ -230,6 +230,22 @@ return $result } + ad_proc -public get_id_by_object_title { + {-title} + } { + Gets the id of a category_tree given an object title (object_type=category). + This is highly useful as the category_tree object title will not change if you change the + name (label) of the category_tree, so you can access the category_tree even if the label has changed. + Why would you want this? E.g. if you have the category widget and want to get only one specific tree + displayed and not all of them. + + @param title object title of the category to retrieve + @return the category_tree_id or empty string it no category was found + @author Malte Sussdorff (malte.sussdorff@cognovis.de) + } { + return [db_string get_tree_id {} -default ""] + } + ad_proc -public get_mapped_trees_from_object_list { object_id_list {locale ""}} { Get the category trees mapped to a list of objects.