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 guys
this happens in Umbraco 7.1.6.
I'm trying to build a nav system, but the helper is return all nodes including unpublished ones. I thought that the helper would only return published content?
Code snippet below:
@foreach (var page in Umbraco.TypedContent(1102).Children) { <li class="@(page.Children.Any() ? "ddm" : null)"> <a href="@page.Url">@page.Name</a> @foreach (var child in page.Children.Where(a=>a.IsVisible())) { <p>@child.Name</p> } </li> }
Anyone can see where I'm going wrong?! I get all nodes including unpublished ones even with the IsVisible method in the query.
Any thoughts?!
Thank you all!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Helper returns all items including unpublished ones.
Hi guys
this happens in Umbraco 7.1.6.
I'm trying to build a nav system, but the helper is return all nodes including unpublished ones. I thought that the helper would only return published content?
Code snippet below:
Anyone can see where I'm going wrong?! I get all nodes including unpublished ones even with the IsVisible method in the query.
Any thoughts?!
Thank you all!
is working on a reply...