Ahh .. easy once you know where to look..! Thanks.
Thought an example of the finished solution might be useful for others (below). Why this is important to do if you want to build page rank with Google is outlined earlier in the thread!
First, in:
Document Types -> CMS.Root -> Transformations -> GoogleSiteMap
modify the transformation, similar to the following:
<url>
<loc><%# Appetere.GoogleSitemapUtils.GetUrlForSitemap( GetDocumentUrl() )%></loc>
<lastmod><%# GetDateTime("DocumentModifiedWhen", "yyyy-MM-dd") %></lastmod>
</url>
Then add a class file to the App_Code directory (or sub-directory), which contains the static method the transformation uses:
// your usual "using" statements plus:
using System.IO;
using CMS.Controls;
using CMS.GlobalHelper;
using CMS.CMSHelper;
namespace Appetere
{
/// <summary>
/// Utility class to help generate Google Site Map
/// </summary>
public static class GoogleSitemapUtils
{
private static readonly string _defaultAlias = string.Empty;
private static readonly string _siteName = string.Empty;
static GoogleSitemapUtils()
{
CMSPageManager pageManager = new CMSPageManager();
_siteName = pageManager.SiteName;
_defaultAlias = CMS.SettingsProvider.SettingsKeyProvider.GetValue(_siteName+".CMSDefaultAliasPath");
}
/// <summary>
/// Returns the same URL received, unless is the default page for the site
/// when replaces filename with "/"
/// </summary>
/// <param name="documentUrl">URL to check</param>
public static string GetUrlForSitemap(string documentUrl)
{
if (documentUrl==null)
{
throw new Exception("documentUrl parameter was null when generating Google sitemap");
}
if (Path.GetFileNameWithoutExtension(documentUrl) ==
Path.GetFileNameWithoutExtension(_defaultAlias))
{
return UrlHelper.GetAbsoluteUrl("/");
}
else
{
return UrlHelper.GetAbsoluteUrl(documentUrl);
}
}
}
}
Then if you check out /CMSPages/GoogleSiteMap.aspx for your domain, the default page will now be shown as "/", hopefully rewarding you with a tiny bit more Google page rank for your efforts.