Skip to content

Instantly share code, notes, and snippets.

@warrenbuckley
Created July 31, 2013 09:15
Show Gist options
  • Save warrenbuckley/6120612 to your computer and use it in GitHub Desktop.
Save warrenbuckley/6120612 to your computer and use it in GitHub Desktop.
Trying to create an XML Sitemap in Umbraco 6. Getting the following error: ============================================================ This page contains the following errors: error on line 9 at column 10: Extra content at the end of the document Below is a rendering of the page up to the first error.
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = null;
Response.ContentType = "text/xml";
}<xml version="1.0" encoding="UTF-8">
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.example.com/</loc>
<lastmod>2005-01-01</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
@drift
Copy link

drift commented Aug 2, 2013

nice, just a heads up:

 var homepage = Umbraco.TypedContentAtRoot().SingleOrDefault();

will fail for multiple sites

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment