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.3 -r1.4 --- openacs-4/packages/content-includelet/tcl/content-includelet-utility-procs.tcl 21 Aug 2008 01:24:09 -0000 1.3 +++ openacs-4/packages/content-includelet/tcl/content-includelet-utility-procs.tcl 30 Aug 2008 00:31:48 -0000 1.4 @@ -23,18 +23,13 @@ -element_id $element_id \ -column package_id] - if { ![db_0or1row item_exists {} ] } { - # Create the content item and stuff its id into the includelet. - - 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] + set item_id [content::item::new \ + -name "Content For $element_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 $item_id] @@ -66,3 +61,17 @@ content_includelet_utilities::configure_content_id $element_id $parameter_id return $package_id } + +ad_proc content_includelet_utilities::delete_content_id { + element_id + {parameter content_id} +} { + Create the includelet's item and set the content_id param. + + @param element_id The content includelet + @param parameter The parameter name to assign to the content item + +} { + content::item::delete \ + -item_id [layout::element::parameter::get -element_id $element_id -key $parameter] +}