Forum OpenACS Development: Response to Is the QD involved when db call is in an included file?

I thought the include file included sub adp templates, not .tcl files. Are you sure this works at all? Here is the code for the include tag:

# Include another template in the current template

template_tag include { params } {

  set src [ns_set iget $params src]
  
  # pass additional arguments as key-value pairs

  set command "template::adp_parse"
  append command " [template::util::url_to_file "$src" "$__adp_stub"]"
  append command " [list"

  for { set i 0 } { $i < [ns_set size $params] } { incr i } {

    set key [ns_set key $params $i]
    if { [string equal $key src] } { continue }
    
    set value [ns_set value $params $i]

    append command " $key "$value"";	# is $value quoted sufficiently?
  }
  append command "]"

  template::adp_append_code "append __adp_output [$command]"
}


This is from acs-templating/tcl/tag-init.tcl