Failed to execute template. Cause: [Access denied when checking [script] access to [xwiki:Collaboratory.UX.HbpSkin.WebHome] for user [xwiki:XWiki.Admin]]. Click on this message for details.

sitemap - HBP Wiki

IAM21 instance, do not create collab nor modify a team, your changes will be lost


Wiki source code of sitemap

Last modified by bougault on 2023/09/15 15:50

Show last authors
1 {{velocity}}
2 #if ($xcontext.action == "get")
3 $response.setContentType("text/xml")
4 #set ($query = $services.query.xwql("where doc.space like 'Collabs' or doc.space like 'Collabs.%' and doc.title <> ''"))
5 #set ($resources = $query.execute())
6 <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
7 #set($home = $xwiki.getDocument('Main.WebHome'))
8 <url>
9 <loc>$home.getExternalURL()</loc>
10 <lastmod>$xwiki.formatDate($home.contentUpdateDate, 'yyyy-MM-dd')</lastmod>
11 </url>
12 #foreach ($resource in $resources)
13 #set($page = $xwiki.getDocument($resource))
14 #if($page)
15 <url>
16 <loc>$page.getExternalURL()</loc>
17 <lastmod>$xwiki.formatDate($page.contentUpdateDate, 'yyyy-MM-dd')</lastmod>
18 </url>
19 #end
20 #end
21 </urlset>
22 #else
23 {{html}}<a href="$doc.getURL('get','outputSyntax=plain')">Generate Sitemap</a>{{/html}}
24 #end
25 {{/velocity}}