Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 26 Jan 2006 01:30:46 -0000 1.6
+++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 27 Jan 2006 17:34:59 -0000 1.7
@@ -280,7 +280,7 @@
{f.title {title:text(inform)}}
{f.page_template {page_template:text(hidden)}}
{f.nls_language {nls_language:text(hidden)}}
- {with_categories false}
+ {with_categories true}
{textfieldspec {text(textarea),nospell {html {cols 60 rows 5}}}}
}
Index: openacs-4/packages/xowiki/www/portlets/categories.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlets/Attic/categories.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/xowiki/www/portlets/categories.adp 27 Jan 2006 17:35:00 -0000 1.1
@@ -0,0 +1,6 @@
+
+
+@content;noquote@
+
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
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/xowiki/www/portlets/categories.tcl 27 Jan 2006 17:35:00 -0000 1.1
@@ -0,0 +1,30 @@
+
+# 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 category [category_tree::get_tree $tree_id] {
+ foreach {category_id category_label deprecated_p level} $category {break}
+ set cat_content ""
+ db_foreach get_pages \
+ "select i.item_id, r.title, i.content_type from category_object_map c, cr_items i, cr_revisions r \
+ where c.object_id = i.item_id and i.parent_id = $folder_id \
+ and category_id = $category_id \
+ and r.revision_id = i.live_revision \
+ " {
+ if {![::xotcl::Object isclass $content_type]} {
+ # we could check for certain page types as well
+ continue
+ }
+ append cat_content "$title
\n"
+ }
+ if {$cat_content ne ""} {
+ append content "$category_label
" $cat_content "
\n"
+ }
+ }
+}
+
+set link ""