I have installed Cultiv Search Engine Sitemap (Razor edition). I renamed the template to Sitemap and razor to HTMLsitemal.cshtml. this template contains following code.
@functions { private static string GetUrlWithDomainPrefix(string url) { if (url.StartsWith("/")) url = url.Substring(1); var domainPrefix = string.Format("http://{0}/", HttpContext.Current.Request.ServerVariables["HTTP_HOST"]); if (url.StartsWith(domainPrefix)) return url; else return domainPrefix + url; } }
When I make page called sitamap with this template applied and run. It shows XML like content and in the top it shows... This XML file does not appear to have any style information associated with it. The document tree is shown below.
I suppose you want to have a html based sitemap displayed, right? The package you installed is creating a sitemap specifically for search engines, which is why you get XML returned. XML sitemaps are used to submit to search engies so they can index the the pages on a site.
If you need a html sitemap I belive you could benefit from using some of the predefined razor snippets or the sitemap xslt snippet in the developer section.
sitemap appears as XML
hello...
I have installed Cultiv Search Engine Sitemap (Razor edition). I renamed the template to Sitemap and razor to HTMLsitemal.cshtml. this template contains following code.
and .cshtml have following code.
When I make page called sitamap with this template applied and run. It shows XML like content and in the top it shows... This XML file does not appear to have any style information associated with it. The document tree is shown below.
So, what is the problem?
Hi Heather
I suppose you want to have a html based sitemap displayed, right? The package you installed is creating a sitemap specifically for search engines, which is why you get XML returned. XML sitemaps are used to submit to search engies so they can index the the pages on a site.
If you need a html sitemap I belive you could benefit from using some of the predefined razor snippets or the sitemap xslt snippet in the developer section.
Hope this helps.
/Jan
yes, u r right.
is working on a reply...