I'm using the latest version I can't find documentation about this problem How do I hide/unhide nav menus programmatically or using umbraco back office Any suggestion?
I have created 4 contents in the back office which is Homepage, Articlepage, Aboutuspage and Newspage my root is the Homepage, example I want to hide Articlepage but How do I access the iteration so I can hide/unhide Articlepage in the navigation menu?
You can add a checkbox property to the Articlepage documenttype called umbracoNaviHide and set it to true for this page, then you can use .Where("Visible") to hide this page in the menu.
Generic properties are buildin in Umbraco and are not editable.
What I mostly do is create a new Document type without template which acts as a composition. I call this _Menu and it contains a tab called Menu and a property Hide in menu with alias umbracoNaviHide.
Then you go to the ArticlePage document type and choose right above for Compositions and click on _Menu.
How to hide/unhide nav menus programmatically?
Hi,
I'm using the latest version I can't find documentation about this problem How do I hide/unhide nav menus programmatically or using umbraco back office Any suggestion?
Glen
Hi Glen,
can you give some more details about the nav menus? Because its not fully clear what you are mean with nav menus.
Is it frontend related?
/Michaël
Hi Michael,
Yes in frontend, Sorry what I mean is this.
I have created 4 contents in the back office which is Homepage, Articlepage, Aboutuspage and Newspage my root is the Homepage, example I want to hide Articlepage but How do I access the iteration so I can hide/unhide Articlepage in the navigation menu?
Hi Glen.
You can add a checkbox property to the Articlepage documenttype called umbracoNaviHide and set it to true for this page, then you can use
.Where("Visible")
to hide this page in the menu.See this thead for more info: https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/57049-umbracoNaviHide-does-not-work
Best of luck!
Hi Dennis,
Now it make sense :) Thanks for the link, but I can't find the Generic Properties I did navigate to Settings>Document Types>ArticlePage What I see is.
Where do I find the Generic Properties? I'm using v7.5.3.
Hi Glen.
You dont have to create the property in the Generic Properties tab, any tab will do.
The Generic Properties tab is no longer avalible to create properties for.
Hi Glen,
Generic properties are buildin in Umbraco and are not editable.
What I mostly do is create a new Document type without template which acts as a composition. I call this _Menu and it contains a tab called Menu and a property Hide in menu with alias umbracoNaviHide.
Then you go to the ArticlePage document type and choose right above for Compositions and click on _Menu.
Now ArticlePage has the tab Menu also.
/Michaël
Hi,
I got it the both of you are correct Thanks for the details it really help me a lot awesome! :)
Cheers
is working on a reply...