Umbraco Navi Hide is true, yet the page still appears!
Hello,
Umbraco version
v7.12.3
What's needed?
I want to hide a page from the top navigation by making use of Umbraco Navi Hide property
Problem
I've added a new property with an alias of umbracoNaviHide and of type CheckBox.
Then, this property was added on the specific Document Type.
The end result is that the page is still showing on the navigation menu.
In the umbraco.config file, I can see this <umbracoNaviHide>1</umbracoNaviHide> for the specific content item.
The code I am using to query for the content items does check for IsVisible
Hi Dave,
This is checked in the code inside the Controller when retrieving data.
Actually, after some observation, the pages are being hidden indeed, but after a long time! If I do any change in the Web.config to cause an application restart, the property takes effect.
I am just concerned now why it takes that much of time to render the changes? Other changes are automatically reflected, but showing/hiding takes time.
And right now while writing I remembered that I am caching the menu data :-) My bad!
Umbraco Navi Hide is true, yet the page still appears!
Hello,
Umbraco version
v7.12.3
What's needed?
I want to hide a page from the top navigation by making use of Umbraco Navi Hide property
Problem
I've added a new property with an alias of
umbracoNaviHide
and of typeCheckBox
. Then, this property was added on the specificDocument Type
. The end result is that the page is still showing on the navigation menu.In the
umbraco.config
file, I can see this<umbracoNaviHide>1</umbracoNaviHide>
for the specific content item.The code I am using to query for the content items does check for IsVisible
page.Descendants().Where(x => x.IsVisible()).OrderBy(x => x.SortOrder)
What's Expected
Once I enable the umbracoNaviHide property on a content page, it's expected that the page gets hidden from the navigation.
Thanks
Hi Bilal,
Is this checked on the page item in your code or on one of the descendants ?
Dave
Hi Dave, This is checked in the code inside the Controller when retrieving data.
Actually, after some observation, the pages are being hidden indeed, but after a long time! If I do any change in the Web.config to cause an application restart, the property takes effect.
I am just concerned now why it takes that much of time to render the changes? Other changes are automatically reflected, but showing/hiding takes time.
And right now while writing I remembered that I am caching the menu data :-) My bad!
Thanks for your time checking this post out.
Regards Bilal
Hi Bilal;
Good to see you found the issue.
I find myself in the same position sometimes. Just after creating a post here I look back at my code and see the problem.
Sometimes taking a few minutes away can help you spot the problem.
Dave
is working on a reply...