Index: openacs-4/packages/ecommerce/www/sitemap.xml.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/sitemap.xml.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/sitemap.xml.tcl 19 Oct 2008 12:30:33 -0000 1.1 @@ -0,0 +1,18 @@ +#sitemap.xml.tcl + +set sitemap_xml " +\n" +set sitemap_list [db_list_of_lists get_catalog_products "select product_id, last_modified from ec_products where active_p='t' and present_p = 't' order by last_modified desc limit 100"] + +foreach url_pair $sitemap_list { + set product_id [lindex $url_pair 0] + set last_modified [lindex $url_pair 1] + set url "[ec_insecure_location][ec_url]product?usca_p=t%26product_id=${product_id}" + set last_mod "" + regsub -- { } $last_modified {T} last_mod + append last_mod ":00" + append sitemap_xml "$url${last_mod}\n" +} +append sitemap_xml "\n" +ns_return 200 text/xml $sitemap_xml +ns_log Notice "ecommerce/www/sitemap.xml.tcl: returning $sitemap_xml" \ No newline at end of file