I'm using the MVCSiteMapProvider in my MVC3 site and I've recently added meta keywords and description to my nodes in the mvc.sitemap
< mvcSiteMapNode controller="Home" action="Index" title="Home" description="" keywords="home, home page, welcome" >
... for example.
Then my view populates it like so:
@{ string title = ""; string keywords = ""; string description = "";
if (SiteMap.CurrentNode != null) { title = SiteMap.CurrentNode["title"]; keywords = SiteMap.CurrentNode["keywords"]; description = SiteMap.CurrentNode["description"]; }
}
< title>>@title< /title>>
< meta name="keywords" content="@keywords" / >
< meta name="description" content="@description" / >
On all my pages I use:
@Html.MvcSiteMap().Menu(0, true, true, 1)
Ever since I started putting content in the keywords section the links in the menu populate like this:
< a href="/?keywords=home%20%2C%20Home%20Page%2C%20welcome" >Home< /a >
I'm not sure why this showed up and I'd like it not to be there. Anyone have any ideas?