Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • RolandWolters 42 posts 63 karma points
    Feb 11, 2013 @ 22:23
    RolandWolters
    0

    Problem with traversing nodes in result from Library.Search

    Hi,

    I'm trying to get a nice formatted search result, and want to include a BreadCrumb, I'm using this code;

      <ul class="unstyled"> @foreach(var page in @Library.Search(@query).Where("Visible")){ <li> <a href="@page.NiceUrl">@page.Name</a> <ul class="breadcrumb"> @foreach(var level in @page.Ancestors()) { <li><a href="@level.Url">@level.Id</a><span class="divider">/</span></li> } </ul> <hr> </li> } </ul>

    However, @page.Ancestors() does not seem to exists. So I even tried to do @Library.NodeById(@page.Id).Ancestors() but no luck here.

    Help! :)

Please Sign in or register to post replies

Write your reply to:

Draft