Index: openacs-4/packages/acs-templating/tcl/acs-integration-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/acs-integration-procs.tcl,v diff -u -N -r1.23.2.3 -r1.23.2.4 --- openacs-4/packages/acs-templating/tcl/acs-integration-procs.tcl 14 Oct 2016 18:58:53 -0000 1.23.2.3 +++ openacs-4/packages/acs-templating/tcl/acs-integration-procs.tcl 30 Mar 2017 09:25:03 -0000 1.23.2.4 @@ -93,13 +93,26 @@ ad_proc adp_parse_ad_conn_file {} { - handle a request for an adp and/or tcl file in the template system. + + Handle a request for an adp and/or tcl file in the template system + based on the current setting of [ad_conn file]. This file is + registered via rp_register_extension_handler + + @see rp_register_extension_handler } { set ::template::parse_level "" #ns_log debug "adp_parse_ad_conn_file => file '[file rootname [ad_conn file]]'" template::reset_request_vars - set parsed_template [template::adp_parse [file rootname [ad_conn file]] {}] + # + # [ad_conn file] is always an absolute name, remove the + # acs::rootdir, compute the template and add the acs::rootdir + # again. + # + set absolute_file [ad_conn file] + set relative_name [string range $absolute_file [string length $::acs::rootdir] end] + set themed_template $::acs::rootdir/[template::themed_template [file rootname $relative_name]] + set parsed_template [template::adp_parse $themed_template {}] if {$parsed_template ne ""} {