Index: openacs-4/packages/xowiki/www/portlets/categories.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlets/Attic/categories.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/portlets/categories.tcl 27 Jan 2006 17:35:00 -0000 1.1 +++ openacs-4/packages/xowiki/www/portlets/categories.tcl 27 Jan 2006 19:04:59 -0000 1.2 @@ -1,11 +1,18 @@ +# valid parameters from the include are +# tree_name: match pattern, if specified displays only the trees with matching names +# no_tree_name: if specified, only tree names are not displayed # get the folder id from the including page set folder_id [$__including_page set parent_id] set package_id [db_string get_package_id \ "select package_id from acs_objects where object_id = $folder_id"] set content "" foreach tree [category_tree::get_mapped_trees $package_id] { - foreach {tree_id tree_name ...} $tree {break} + foreach {tree_id my_tree_name ...} $tree {break} + if {[info exists tree_name] && ![string match $tree_name $my_tree_name]} continue + if {![info exists no_tree_name]} { + append content "

$my_tree_name

" + } foreach category [category_tree::get_tree $tree_id] { foreach {category_id category_label deprecated_p level} $category {break} set cat_content ""