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 am trying to get the chidren result of a parent :
But I just have the content of the first page "Formation Example" rendered in my view
I would like to know if is there is a way to render the proper Items in the second page.
Here is how it is done :
@{ var selection = CurrentPage.Children(CurrentPage.Id) .Where(x => x.IsVisible()); } <ul> @foreach(var item in selection){ <li> <a href="@item.Url">@item.Name</a> </li> } </ul>
If you have an idea to help me to go further.
Thanks
I found out ! :)
@{ IPublishedContent homePage = Umbraco.AssignedContentItem.AncestorOrSelf("page"); IEnumerable<IPublishedContent> pageLinks = homePage.Children(); } <ul class="link-page-formation"> @if (pageLinks != null && pageLinks.Count() > 0) { foreach (IPublishedContent page in pageLinks) { <li><h6><a href="@page.Url">@page.Name</a></h6></li> } } </ul>
it worked for me, thanks.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Get children Item from the proper content page
Hi !
I am trying to get the chidren result of a parent :
But I just have the content of the first page "Formation Example" rendered in my view
I would like to know if is there is a way to render the proper Items in the second page.
Here is how it is done :
If you have an idea to help me to go further.
Thanks
I found out ! :)
it worked for me, thanks.
is working on a reply...