maartenba/MvcSiteMapProvider — Issue #5: MvcSiteMap version 3.2 is not pulling/evaluating MvcSiteMapTitleKey value from view Data
Author: sharad11978
Created: 2011-12-22 06:54:39+00:00
State: open

I had setup mvc sitemap version 3.1 RC and it is working absolutely fine but when I upgrade it to the assembly version 3.2 it doesn't pull MvcSiteMapTitleKey value from ViewData. We had setup the MvcSitemap with following information:

**Action Method:**

[SiteMapTitle("MvcSiteMapTitleKey")]
public ActionResult CompareMonths(string firstMonth, string secondMonth)
{
ViewData["MvcSiteMapTitleKey"] = String.Format("Compare {0} to {1}", model.Month1.MonthYearDisplay, model.Month2.MonthYearDisplay);
return View(model);
}
[SiteMapTitle("MvcSiteMapTitleKey")]
public ActionResult CompareYears(string firstMonth, string secondMonth)
{
ViewData["MvcSiteMapTitleKey"] = String.Format("Compare {0} to {1}", model.Month1.MonthYearDisplay, model.Month2.MonthYearDisplay);
return View(model);
}

**mvc.sitemap**

<mvcSiteMapNode title="Budget" action="Budget">
<mvcSiteMapNode action="CompareMonths" changeFrequency="Always" updatePriority="Normal" />
<mvcSiteMapNode action="CompareYears" changeFrequency="Always" updatePriority="Normal" />
</mvcSiteMapNode>