neel k

neel k

  • NA
  • 143
  • 136.4k

MVC 5 Breadcrumb

Mar 26 2015 3:47 PM
hi,
I am using MVC 5 in my application, I that I need to implement breadcrumb, for that I am using sitemap provider but it showing vertical menu, I need to display horizontal breadcrumb.
this is the code of breadcrumb:
<ul class="breadcrumb">
<li>@Html.ActionLink("GPS Admin Tools", "Index", new { controller = "Home" }, new { hidefocus = "hidefocus" , @class = "breadcrumb-title" })</li>
@if (Model.Nodes.Count != 1)
{
foreach (var node in Model.Nodes)
{
if (node == Model.Nodes.First())
{
continue;
}
if (node != Model.Nodes.Last())
{
string url = node.IsClickable ? node.Url : "#";
<li><a href="@url">@node.Title</a><span class="divider">></span></li>
}
else
{
<li class="active">@node.Title</li>
}
}
}
</ul>
thanks

Answers (1)