Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bilal Haidar 144 posts 410 karma points
    Sep 25, 2018 @ 06:41
    Bilal Haidar
    0

    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

    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

  • Dave Woestenborghs 3504 posts 12134 karma points MVP 9x admin c-trib
    Sep 26, 2018 @ 08:59
    Dave Woestenborghs
    0

    Hi Bilal,

    Is this checked on the page item in your code or on one of the descendants ?

    Dave

  • Bilal Haidar 144 posts 410 karma points
    Sep 26, 2018 @ 09:02
    Bilal Haidar
    0

    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

  • Dave Woestenborghs 3504 posts 12134 karma points MVP 9x admin c-trib
    Sep 26, 2018 @ 09:35
    Dave Woestenborghs
    1

    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

Please Sign in or register to post replies

Write your reply to:

Draft