Creating a breadcrumbpath in umbraco with razor


/ Published in: C#
Save to your folder(s)



Copy this code and paste it in your HTML
  1. @* http://goo.gl/C1IAx <- umbraco dynamic node reference *@
  2. @{
  3. <ul class="breadcrumbs">
  4. @foreach(var page in Model.Ancestors().Where("umbracoNaviHide != true").Where("level > 1"))
  5. {
  6. <li><a href="@page.Url">@page.Name</a></li>
  7. }
  8. <li>@Model.Name</li>
  9. </ul>
  10. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.