Kendo UI's default menu is great but Bootstrap's menu is awesome. What must I do in order to keep the same Bootstrap menu's structure while calling the menus via kendo ui ?
bootstrap menu structure:
<div style="height: 0px;" class="nav-collapse clr collapse">
<ul class="nav pull-left">
<li class="active"><a href="#">Home</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Customer <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="nav-header">Customer Mgt</li>
<li class="divider"></li>
<li><a href="#">Manage</a></li>
<li><a href="#">New Customer</a></li>
<li class="divider"></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Cards <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="nav-header">Card Mgt</li>
<li class="divider"></li>
<li><a href="#">Manage</a></li>
<li><a href="#">Diagnosis</a></li>
<li class="divider"></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Reports <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="nav-header">Report Mgt</li>
<li class="divider"></li>
<li><a href="#">Download Report</a></li>
<li><a href="#">Transaction Report</a></li>
<li class="divider"></li>
</ul>
</li>
<li><a href="#contact">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
<!-- / header menu -->
<!-- search bar -->
<form class="navbar-search pull-right">
<input type="text" placeholder="Search" class="search-query">
</form>
<!-- / search bar -->
</div>
kendo calling its menu
<div style="height: 0px;" class="nav-collapse clr collapse">
<!-- header menu -->
@(Html.Kendo().Menu()
.Name("menu")
.Items(menu =>
{
menu.Add().Text("Home").Action("Index", "Home");
menu.Add().Text("Customers").Items(cust =>
{
cust.Add().Text("Manage").Action("Index", "Customer");
cust.Add().Text("New Customer").Action("Create", "Customer");
});
menu.Add().Text("Cards").Items(card =>
{
card.Add().Text("Manage").Action("Index", "Card");
card.Add().Text("Diagnosis").Action("Diagnosis", "Card");
card.Add().Text("Personalise").Action("PrintPersonalise", "Card");
});
menu.Add().Text("Reports").Items(report =>
{
report.Add().Text("Download report").Action("Index", "TerminalDownloadLog");
report.Add().Text("Transaction report").Action("Index", "Transaction");
});
menu.Add().Text("About").Action("About", "Home");
}))
</div>
I have been trying to solve this myself and have come to the conclusion that you need to either use the Kendo menu or Bootstrap menu.
Both rely on their own JS libs so you can't easily use both.
Instead I used the following code to create my own HTML helper that generates nice hierarchical menus for Bootstrap.
Credit:
http://madushaonline.wordpress.com/2013/09/24/active-links-on-bootstrap-navbar-with-asp-net-mvc/