I have just tried your code, against the starterkit,Umbraco7.1.6, the only thing I can see that is missing in your code is the var in the front of the page.
@foreach(var page in Umbraco.ContentAtRoot().DescendantsOrSelf("Frontpage").First().Children.Where("Visible")){
}
If I then try to hide a page by set tick in the umbracoNaviHide, then the page is hidden from the navigation. To make it clear it´s the propertyAlias that should have the value of umbracoNaviHide
So the only thing I can see that is missing is the var before the page in the forech-loop. If it doesn't work, then maybe you could try to describe your content structure, maybe there can be something there.
umbracoNaviHide does not work
Hey
I just tryed to get umbracoNaviHide to work. Added a True/false datatype to my Page documenttype, named umbracoNaviHide.
I reader my menu like this:
@foreach(page in Umbraco.ContentAtRoot().DescendantsOrSelf("Frontpage").First().Children.Where("Visible"))
but it stills renders the hidden pages. Can anybody tell me why?
Hi Jacob,
I have just tried your code, against the starter kit, Umbraco 7.1.6, the only thing I can see that is missing in your code is the var in the front of the page.
If I then try to hide a page by set tick in the umbracoNaviHide, then the page is hidden from the navigation. To make it clear it´s the propertyAlias that should have the value of umbracoNaviHide
So the only thing I can see that is missing is the var before the page in the forech-loop. If it doesn't work, then maybe you could try to describe your content structure, maybe there can be something there.
Hope this helps,
/Dennis
Hej
My code is:
And the field on my page document type:
Im also running 7.1.6. Thats strange, i think i need to debug this.
The problem is that when you call render menu again to render submenu's you don't have the where clause to only show visible items
Dave
Yes. Thats right. Thanks.
is working on a reply...