This question is locked. New answers and comments are not allowed.
Something broke when I upgraded form the Q1 release to the Q2 release of the MVC Menu.
Under the hood, I have the following object representing my menu:
I have the following code that worked prior to upgrading:
I use the Telerik CDN, so my stylesheets and javascript are correct for the version:
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/mvcz/2011.2.712/telerik.common.min.js"></script>
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/mvcz/2011.2.712/telerik.menu.min.js"></script>
It appears that the problem is that the actual HTML markup is not being output in the page. Not even the SiteMenu div.
I tried looking through the release notes, but I didn't see anything that should have changed.
Under the hood, I have the following object representing my menu:
[Serializable()] public class Menu : List<MenuItem> { } [Serializable()] public class MenuItem { public long ItemId { get; set; } public string Text { get; set; } public string Type { get; set; } public string Url { get; set; } public long ObjectId { get; set; } public Menu Children { get; set; } public bool Selected { get; set; } public MenuItem() { Selected = false; } }
I have the following code that worked prior to upgrading:
@{ MySite.Menu menu = ViewBag.Menu; } @if (menu != null) { Html.Telerik().Menu().Name("SiteMenu").BindTo(menu, mappings => { mappings.For<MySite.MenuItem>(binding => binding .ItemDataBound((item, menuItem) => { item.Text = menuItem.Text; if (menuItem.Url != null) item.Url = menuItem.Url; item.Selected = menuItem.Selected; }) .Children(menuItem => menuItem.Children) ); }); }
I use the Telerik CDN, so my stylesheets and javascript are correct for the version:
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/mvcz/2011.2.712/telerik.common.min.js"></script>
<script type="text/javascript" src="http://aspnet-scripts.telerikstatic.com/mvcz/2011.2.712/telerik.menu.min.js"></script>
I tried looking through the release notes, but I didn't see anything that should have changed.