Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: How to create a good url from the sitemap addon "MvcSiteMapProvider"?


I am using Mvcsitemapprovider. I have a MVC 3 project which use MvcSiteMapProvider.

MvcSiteMapProvider generate this bad xml element

this is a good element;

this is a bad element;



What's wrong with this code?

public ActionResult Content(string contentCategory, string content)
Content Model = ContentRepository.Find(x => x.Tag == content && x.ContentCategory.Tag == contentCategory);

return View(Model);

public override IEnumerable GetDynamicNodeCollection()
var list = new List();

foreach (Content content in ContentRepository.GetAll())
DynamicNode node = new DynamicNode
Title = content.Name,
Controller = "Home",
Action = "content",
ParentKey = "Root",
ChangeFrequency = ChangeFrequency.Weekly,
UpdatePriority = UpdatePriority.High
node.RouteValues.Add("contentCategory", content.ContentCategory.Tag);
node.RouteValues.Add("content", content.Tag);

return list;

Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered

This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: How to create a good url from the sitemap addon "MvcSiteMapProvider"?


Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription