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

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

user263980:

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

MvcSiteMapProvider generate this bad xml element

this is a good element



http://ift.tt/2hGK59F;
weekly
0.75



this is a bad element




http://ift.tt/2A9Riph;

weekly

0.75



What's wrong with this code?


[HttpGet]
[ActionName("content")]
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);
list.Add(node);
}


return list;
}



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


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

×