Index: openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl,v diff -u -r1.44.2.1 -r1.44.2.2 --- openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 25 Aug 2015 16:01:42 -0000 1.44.2.1 +++ openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 27 Aug 2015 08:06:57 -0000 1.44.2.2 @@ -796,8 +796,13 @@ -subsite_id {-theme:required} } { - Set the theme for the given subsite. This will change the subsite's ThemeKey, - DefaultMaster, and ThemeCSS parameters. + Set the theme for the given or current subsite. This will change + the subsite's ThemeKey, DefaultMaster, and ThemeCSS, + DefaultFormStyle, DefaultListStyle, DefaultListFilterStyle, + DefaultDimensionalStyle, and ResourceDir parameters. + + @param subsite_id id of the subsite + @param theme Name of the theme (theme key)x } { if { ![info exists subsite_id] } { set subsite_id [ad_conn subsite_id] @@ -817,8 +822,26 @@ -value $list_template parameter::set_value -parameter DefaultListFilterStyle -package_id $subsite_id \ -value $list_filter_template + parameter::set_value -parameter DefaultDimensionalStyle -package_id $subsite_id \ + -value $dimensional_template + parameter::set_value -parameter ResourceDir -package_id $subsite_id \ + -value $resource_dir } +ad_proc -public subsite::get_theme { + -subsite_id +} { + Get the theme for the given (or current) subsite. + + @param subsite_id id of the subsite + @return Name of the theme (theme key) +} { + if { ![info exists subsite_id] } { + set subsite_id [ad_conn subsite_id] + } + parameter::get -parameter ThemeKey -package_id $subsite_id +} + ad_proc -public subsite::new_subsite_theme { -key:required -name:required @@ -828,6 +851,7 @@ {-list_template ""} {-list_filter_template ""} {-dimensional_template ""} + {-resource_dir ""} } { Add a new subsite theme, making it available to the theme configuration code. } {