Index: openacs-4/packages/content-includelet/content-includelet.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/content-includelet/content-includelet.info,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/content-includelet/content-includelet.info 11 Jul 2008 16:38:54 -0000 1.1
+++ openacs-4/packages/content-includelet/content-includelet.info 21 Aug 2008 01:24:09 -0000 1.2
@@ -7,14 +7,14 @@
f
f
-
+
OpenACS
2008-07-11
OpenACS
0
-
-
+
+
Index: openacs-4/packages/content-includelet/tcl/apm-callback-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/content-includelet/tcl/apm-callback-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/content-includelet/tcl/apm-callback-procs.tcl 30 Jul 2008 11:49:37 -0000 1.2
+++ openacs-4/packages/content-includelet/tcl/apm-callback-procs.tcl 21 Aug 2008 01:24:09 -0000 1.3
@@ -32,7 +32,7 @@
-title "Content Includelet" \
-application content-includelet \
-template /packages/content-includelet/lib/content-includelet \
- -initializer content_includelet_utilities::configure_content_id
+ -initializer content_includelet_utilities::configure_content_id
}
}
Index: openacs-4/packages/content-includelet/tcl/content-includelet-utility-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/content-includelet/tcl/content-includelet-utility-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/content-includelet/tcl/content-includelet-utility-procs.tcl 30 Jul 2008 11:49:37 -0000 1.2
+++ openacs-4/packages/content-includelet/tcl/content-includelet-utility-procs.tcl 21 Aug 2008 01:24:09 -0000 1.3
@@ -19,22 +19,25 @@
@param parameter The parameter name to assign to the content item
} {
- # Create the content item and stuff its id into the includelet.
-
set package_id [layout::element::get_column_value \
-element_id $element_id \
-column package_id]
+
+ if { ![db_0or1row item_exists {} ] } {
+ # Create the content item and stuff its id into the includelet.
- set content_id [content::item::new \
- -name "Content For $package_id's $parameter" \
- -parent_id $package_id \
- -context_id $package_id \
- -content_type content_includelet_revision \
- -storage_type text]
+ set item_id [content::item::new \
+ -name "Content For $package_id's $parameter" \
+ -parent_id $package_id \
+ -context_id $package_id \
+ -content_type content_includelet_revision \
+ -storage_type text]
+ }
+
layout::element::parameter::add_values \
-element_id $element_id \
- -parameters [list $parameter $content_id]
+ -parameters [list $parameter $item_id]
}
ad_proc content_includelet_utilities::mount_and_configure_content_id {
@@ -54,9 +57,12 @@
-instance_name $instance_name \
-pretty_name $pretty_name \
content-includelet]
- layout::element::parameter::set_values \
+
+ layout::element::parameter::set_column_value \
-element_id $element_id \
- -parameters [list package_id $package_id]
+ -column package_id \
+ -value $package_id
+
content_includelet_utilities::configure_content_id $element_id $parameter_id
return $package_id
}