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 all
I have a site structure
Home Artists Artist
I have this snippet for getting subpages of Artists where Artists is the current node.But it doesnt work when on one of the Artist pages.
<ul> @foreach (var item in @Model.Artist.Where("Visible")) { <li><a href="@item.Url">@item.Name</a></li>}</ul>
What should I be doing so that I can list all Artists items when Current node is either Artists or Artist doctype.
Cheers
J
Hi. I hope it will help:
<ul> @foreach (var item in Model.AncestorOrSelf("artists").Children.Where("Visible")) { <li><ahref="@item.Url">@item.Name</a></li>}</ul>
Perfect
Thanks Rodion
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
List subpages of parent from parent node or child node
Hi all
I have a site structure
Home
Artists
Artist
I have this snippet for getting subpages of Artists where Artists is the current node.But it doesnt work when on one of the Artist pages.
What should I be doing so that I can list all Artists items when Current node is either Artists or Artist doctype.
Cheers
J
Hi. I hope it will help:
Perfect
Thanks Rodion
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.