Content not displaying in partial view, variable selection is empty.
I have created a document type with Title(textbox) media(media picker) content(richtext editor). From this I let umbraco generate a template.
I have a root document type already I am using for this.
I added the items I wanted into my Content section.
Then I created a partial view to display these items in the view. My problem is when I use the umbraco query builder in my partial view it does not return any of the content.
When I select another content in the query builder it works. I am not sure why it's not returning anything and when debugging the selection variable is empty as well.
I redid the document type a few times but without success, I am wondering if it has something to do with the parent root document type but unsure where to look or what to look for.
Content not displaying in partial view, variable selection is empty.
I have created a document type with Title(textbox) media(media picker) content(richtext editor). From this I let umbraco generate a template. I have a root document type already I am using for this.
I added the items I wanted into my Content section.
Then I created a partial view to display these items in the view. My problem is when I use the umbraco query builder in my partial view it does not return any of the content.
When I select another content in the query builder it works. I am not sure why it's not returning anything and when debugging the selection variable is empty as well.
@{ var selection = Umbraco.ContentAtRoot().FirstOrDefault() .ChildrenOfType("myfunTabs") .Where(x => x.IsVisible()); } <ul> @foreach (var item in selection) { <li> <a href="@item.Url">@item.Name</a> </li> } </ul>
I redid the document type a few times but without success, I am wondering if it has something to do with the parent root document type but unsure where to look or what to look for.
I think I got it I had to select 1 deeper down in the query builder. it's working now
is working on a reply...