| |
2032 |
2032 |
set time "[clock format [clock scan $time] -format {%Y-%m-%dT%T}]${tz}:00" |
| |
2033 |
2033 |
|
| |
2034 |
2034 |
#my log "--site_node::get_from_object_id -object_id $package_id" |
| |
2035 |
2035 |
array set info [site_node::get_from_object_id -object_id $package_id] |
| |
2036 |
2036 |
|
| |
2037 |
2037 |
append content <sitemap> \n\ |
| |
2038 |
2038 |
<loc>[ad_url]$info(url)sitemap.xml</loc> \n\ |
| |
2039 |
2039 |
<lastmod>$time</lastmod> \n\ |
| |
2040 |
2040 |
</sitemap> |
| |
2041 |
2041 |
} |
| |
2042 |
2042 |
append content </sitemapindex> \n |
| |
2043 |
2043 |
#set t text/plain |
| |
2044 |
2044 |
set t text/xml |
| |
2045 |
2045 |
ns_return 200 $t $content |
| |
2046 |
2046 |
} |
| |
2047 |
2047 |
|
| |
2048 |
2048 |
Package instproc google-sitemapindex {} { |
| |
2049 |
2049 |
[self class] [self proc] |
| |
2050 |
2050 |
} |
| |
2051 |
2051 |
|
| |
|
2052 |
Package instproc clipboard-copy {} { |
| |
|
2053 |
[my folder_id] clipboard-copy |
| |
|
2054 |
} |
| |
|
2055 |
|
| |
2052 |
2056 |
# |
| |
2053 |
2057 |
# Create new pages |
| |
2054 |
2058 |
# |
| |
2055 |
2059 |
|
| |
2056 |
2060 |
Package instproc edit-new {} { |
| |
2057 |
2061 |
my instvar folder_id id |
| |
2058 |
2062 |
set object_type [my query_parameter object_type "::xowiki::Page"] |
| |
2059 |
2063 |
set autoname [my get_parameter autoname 0] |
| |
2060 |
2064 |
set parent_id [$id query_parameter parent_id ""] |
| |
2061 |
2065 |
if {$parent_id eq ""} {set parent_id [$id form_parameter folder_id $folder_id]} |
| |
2062 |
2066 |
if {![string is integer -strict $parent_id]} {error "parent_id must be integer"} |
| |
2063 |
2067 |
set page [$object_type new -volatile -parent_id $parent_id -package_id $id] |
| |
2064 |
2068 |
#my ds "parent_id of $page = [$page parent_id], cl=[$page info class] parent_id=$parent_id\n[$page serialize]" |
| |
2065 |
2069 |
if {$object_type eq "::xowiki::PageInstance"} { |
| |
2066 |
2070 |
# |
| |
2067 |
2071 |
# If we create a PageInstance via the ad_form based |
| |
2068 |
2072 |
# PageInstanceForm, we have to provide the page_template here to |
| |
2069 |
2073 |
# be able to validate the name, where "build_name" needs |
| |
2070 |
2074 |
# access to the ::xowiki::PageTemplate of the |
| |
2071 |
2075 |
# ::xowiki::PageInstance. |