Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I'm trying to get a nice formatted search result, and want to include a BreadCrumb, I'm using this code;
However, @page.Ancestors() does not seem to exists. So I even tried to do @Library.NodeById(@page.Id).Ancestors() but no luck here.
Help! :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
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! :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.