Index: openacs-4/packages/curriculum/lib/user-curriculums.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/lib/user-curriculums.tcl,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/curriculum/lib/user-curriculums.tcl 14 Jun 2003 16:29:24 -0000 1.4 +++ openacs-4/packages/curriculum/lib/user-curriculums.tcl 2 Dec 2003 15:57:32 -0000 1.4.2.1 @@ -11,7 +11,18 @@ logged_in_p:onevalue } -set package_id [curriculum::conn package_id] +# package_id may or may not be provided as an attribute with the tag. +if { ![info exists package_id] } { + set package_id [curriculum::conn package_id] + # Use the ordinary template (user-curriculums.adp). + set template "" +} else { + # package_id provided. + # Assume it came from the portlet and use the "summary" template. + set community_name [site_nodes::get_parent_name -package_id $package_id] + set indent [string repeat " " 4] + set template /packages/curriculum/lib/summary +} set logged_in_p [ad_conn user_id] @@ -28,4 +39,4 @@ set return_url [ad_return_url] set return_url_export [export_vars -url return_url] -ad_return_template +ad_return_template $template