This question is locked. New answers and comments are not allowed.
Hi, I have a menu control that is correctly displaying my menu, but I'm stuck on a problem. See the following view code.
Under the projects menu heading, I want to list the names of the projects as submenu items the logged in user controls. That is, I need to bind this submenu to a model that returns the current list of projects owned by the logged in user.
How do I do this? I have only found examples of binding the whole menu to a model. Can I do this with a content template, somehow? Or is there way to bind only a submenu to a model?
Thanks in advance!
@{ Html.Telerik().Menu()
.Name("Menu")
.Items(menu =>
{
menu.Add().Text("Dashboard").Action("Index", "Tasks");
menu.Add().Text("People").Action("Index", "People");
menu.Add().Text("Projects").Action("Index", "Projects").Items(?????)
........
} )
.Render();
}
How do I do this? I have only found examples of binding the whole menu to a model. Can I do this with a content template, somehow? Or is there way to bind only a submenu to a model?
Thanks in advance!