To use this, you need to add a new property of type true/false where
you change the alias of the property to: umbracoNaviHide.
I know about this property, but I don't want to hide parant to list page from navigation, I only want to hide all of children and dont force users to check umbracoNaviHide
Like:
Blog (not hidden)
-- blog-post-1 (hidden)
-- blog-post-2 (hidden)
How to filter pages where children in listview?
Hello. I render navigation recursivly and collided with a problem: I don't want to render items that is a list of items like blog.
What I want:
So, I would create a property in blog like "isListView" to filter by it, but may be exists a builtin property to do the same?
Hi Dimitry,
yes you are correct, Umbraco has a builtin property called
umbracoNaviHide
.To use this, you need to add a new property of type true/false where you change the alias of the property to:
umbracoNaviHide
.Then you can filter your list by using
.Where("Visible")
and then you will only get the items where this property is set to false.Hope this helps.
/Michaël
Hi, Michaël
I know about this property, but I don't want to hide parant to list page from navigation, I only want to hide all of children and dont force users to check
umbracoNaviHide
Like:
Depending on how you have coded your nav, you could for example exclude the blog posts by their document type alias:
Hi, Matt
I thought about that and I don't like that way, because it is not universal. What if sitetree will be axtended another listview that is not blogpost?
Now I thinking about trying to add a composition document type with one property like "isList" and add it type to every ListView document type
is working on a reply...