Copied to clipboard

Flag this post as spam?

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


  • Tom 713 posts 954 karma points
    Jul 14, 2011 @ 03:38
    Tom
    0

    Visible?

    Hi Guys,

    I've seen alot of razor examples using Where("Visible")?

     

    just wondering what Visible is as a keyword..

     

     

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 14, 2011 @ 09:17
    Dennis Aaen
    0

    Hi Tom,

    The Visible is doing so you hidden menu items in navigation for example. I believe that alias on the document type should be umbracoNaviHide, like when you work with XSLT. I found a video on Umbraco.tv, where they explain the visible keyword.

    http://umbraco.com/help-and-support/video-tutorials/umbraco-fundamentals/razor/listing-subpages-from-current-page

    The section around visible starts 7:34 into the movie

    Hope the video answers your question.

    /Dennis

  • Rich Green 2246 posts 4008 karma points
    Jul 14, 2011 @ 09:50
    Rich Green
    4

    Hi,

    Whilst 'Visible' is a great keyword to use it's hard for people without previous Umbraco experience to make the connection. It's always been recommended in Umbraco to use the alias 'umbracoNaviHide' (be careful of casing) as the standard property name when you wish to show/hide a node.

    This way when packages or code snippets were released, everyone would use the same keyword universally.

    However, when Razor got introduced I'm guessing a wrapper got added that uses the "visible" keyword and in the background this is changed to umbracoNaviHide as Tom says.

    Some other Umbraco special keywords are listed here http://our.umbraco.org/wiki/reference/umbraco-best-practices/umbraconavihide

    Hope that helps

    Rich

  • Tom 713 posts 954 karma points
    Jul 14, 2011 @ 09:59
    Tom
    0

    Thanks Rich & Dennis!

    yep spot on!

  • Imdad Ali 6 posts 77 karma points
    Jun 19, 2018 @ 12:48
  • 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