Copied to clipboard

Flag this post as spam?

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


  • Boris 9 posts 49 karma points
    Jun 29, 2015 @ 09:57
    Boris
    0

    How to set(from the CMS Content editor) the property Visible(of a page) to be false

    Hi,

    In one of my pages I loop through all children and want to show just these that are Visible. I want some of them to be hidden. I need to set the Visible property to false from the CMS.

    How could I do that?

    Regards, Boris

  • Stefano Beretta 91 posts 235 karma points
    Jun 29, 2015 @ 10:26
    Stefano Beretta
    100

    Hi Boris,

    umbraco has a built-in property which can be used while iterating the nodes.

    1. Add to your document types a property of type true/false with the alias "umbracoNaviHide"

    2. While iterating the nodes you can check the property with the method IsVisible() called on the current node (node.IsVisible()) or using lambda expression nodes.Where(x=>x.IsVisible()) for filtering

    here you can find some documentation (paragraph Complex querying)

    Hope this help

    BR

    Stefano

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies