Index: openacs-4/packages/static-portlet/www/static-admin-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/www/static-admin-portlet.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/static-portlet/www/static-admin-portlet.tcl 9 Aug 2002 18:39:33 -0000 1.12 +++ openacs-4/packages/static-portlet/www/static-admin-portlet.tcl 16 Oct 2002 15:41:55 -0000 1.13 @@ -20,20 +20,43 @@ @author arjun (arjun@openforce) @author Ben Adida (ben@openforce) @cvs_id $Id$ -} -properties { +} { + package_id:optional + template_portal_id:optional + referer:optional + return_url:optional } +if {![exists_and_not_null package_id]} { + set package_id [dotlrn_community::get_community_id] +} + +if {![exists_and_not_null template_portal_id]} { + set template_portal_id [dotlrn_community::get_portal_id] +} + +if {[exists_and_not_null return_url]} { + set referer $return_url +} + +if {![exists_and_not_null referer]} { + set referer [ad_conn url] +} + set element_pretty_name [ad_parameter static_admin_portlet_element_pretty_name static-portlet "Custom Portlet"] set element_pretty_plural [ad_parameter static_admin_portlet_element_pretty_plural static-portlet "Custom Portlets"] -set package_id [dotlrn_community::get_community_id] +ns_log notice "package_id = $package_id" db_multirow content select_content { select content_id, pretty_name from static_portal_content where package_id = :package_id } -set template_portal_id [dotlrn_community::get_portal_id] + set applet_url "[dotlrn_applet::get_url]/[static_portlet::my_package_key]" -set referer [ad_conn url] + + + +