Jason94
Jason94

Reputation: 13610

Why is Visible controlled by

In my home page I have the following snippet that fetches all blog posts:

var docs = CurrentPage.Children.Where("Visible")

What I don't understand is that Visible is controlled by a property in the document named umbracoNaviHide. Setting it to true on the document excludes the page from the list above.

How is umbracoNaviHide translated to Visible? I have no macros or XSLT (none actually) that is doing anything funny...

Upvotes: 0

Views: 528

Answers (1)

wingyip
wingyip

Reputation: 3536

umbracoNaviHide is one of umbraco's internal property implementations.

We used to have to check the property explicitly in xslt but nowadays it is used as you are using it here.

Here is a more complete explanation from the Umbraco wiki

The "umbracoNaviHide" is an Umbraco convention for marking nodes which should not show up in a navigational context. It is normally added (or inherited) on every Document Type with a Data Type of "True/false". NOTE: This property is not added by default on new installations, meaning you need to add it manually

There are a number of other useful properties that everybody should know about:

  • umbracoSitemapHide
  • umbracoUrlAlias
  • umbracoUrlName
  • umbracoInternalRedirectId
  • umbracoRedirect

We always insert these properties on a master page doctype so that all other doc types that represent data on web page content nodes inherit them

Wing

Upvotes: 1

Related Questions