Index: openacs-4/packages/cms/www/modules/templates/datasources.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/datasources.tcl,v diff -u -N -r1.1.1.1 -r1.1.1.1.14.1 --- openacs-4/packages/cms/www/modules/templates/datasources.tcl 20 Apr 2001 20:51:10 -0000 1.1.1.1 +++ openacs-4/packages/cms/www/modules/templates/datasources.tcl 31 Aug 2006 19:59:07 -0000 1.1.1.1.14.1 @@ -16,9 +16,11 @@ set tcl_stub "${url}.tcl" -# In the future, we may have many roots ! -set template_root [publish::get_template_root] -set tcl_file [ns_normalizepath "/$template_root/${url}.tcl"] +# Get template path +set path [content::template::get_path -template_id $template_id \ + -root_folder_id [cm::modules::templates::getRootFolderID [ad_conn subsite_id]]] +set tcl_file [ns_normalizepath "[acs_root_dir]/templates/${path}.tcl"] +ns_log debug "datasources.tcl: looking for template code in $tcl_file" # Load and process the file if { ![file exists $tcl_file] } {