Index: openacs-4/contrib/packages/bcms-ui-base/resources/template-form.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/resources/template-form.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/bcms-ui-base/resources/template-form.tcl 27 Oct 2003 10:17:21 -0000 1.2 +++ openacs-4/contrib/packages/bcms-ui-base/resources/template-form.tcl 15 Apr 2004 16:19:57 -0000 1.3 @@ -59,6 +59,14 @@ } -new_data { + # if this is a new template and the content is blank and the file exists + # will source out the file contents and use that + set template_filename "[acs_root_dir]/templates/${cms_context}/${name}.adp" + # read the file contents from the file system + if {[file exists $template_filename] && [empty_string_p $content]} { + set content [template::util::read_file $template_filename] + } + # create the template and revision db_transaction { set item_id [bcms::template::create_template -template_name $name -parent_id $folder_id]