Index: openacs-4/packages/xcms-ui/www/admin/setup.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xcms-ui/www/admin/setup.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/xcms-ui/www/admin/setup.tcl 1 May 2004 13:23:03 -0000 1.3 +++ openacs-4/packages/xcms-ui/www/admin/setup.tcl 26 May 2004 01:05:22 -0000 1.4 @@ -1,3 +1,4 @@ + ad_page_contract { setup folders and templates @@ -51,7 +52,7 @@ -content_types "content_revision content_folder content_extlink content_symlink image" \ -subtypes ] - + # Main Subsite folder -100 already has a corresponding template # folder. If we are not setting up for folder_id -100 create # a template folder also @@ -69,8 +70,8 @@ # load in default templates -set template_root "/templates${sn(url)}" -set template_dir "[acs_root_dir]${template_root}" +set template_root "templates${sn(url)}" +set template_dir "[acs_root_dir]/${template_root}" set www_dir "[acs_root_dir]/www${sn(url)}" if {![file exists $template_dir]} { @@ -93,10 +94,14 @@ set content [read $fd] close $fd + # setup use_context + + db_dml set_use_context "insert into cr_template_use_contexts values ('xcms-${package_id}-public')" + bcms::template::register_template \ -template_id $template_id \ -content_type $content_type \ - -context "public" \ + -context "xcms-public" \ -is_default_p "t" bcms::template::add_template \ @@ -108,6 +113,19 @@ } + +# import the sample index page +set fd [open ${template_base}sample-index.adp] +set sample_index_content [read $fd] +close $fd + +bcms::create_page \ + -page_name "index" \ + -folder_id $folder_id \ + -mime_type "text/html" \ + -title "XCMS Sample Index" \ + -page_body $sample_index_content + # set parameters parameter::set_value -parameter "root_folder_id" -value $folder_id