PublishingWeb.IncludeInCurrentNavigation property

Controls whether this Web site is included by PortalSiteMapProvider objects that have NavigationType set to Current.

Namespace:  Microsoft.SharePoint.Publishing
Assembly:  Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)


Public Property IncludeInCurrentNavigation As Boolean
Dim instance As PublishingWeb
Dim value As Boolean

value = instance.IncludeInCurrentNavigation

instance.IncludeInCurrentNavigation = value
public bool IncludeInCurrentNavigation { get; set; }

Property value

Type: System.Boolean
A Boolean value that represents whether this Web site is included.
The default value is true. The property is set to true if the PublishingWeb object should be included; otherwise, it is set to false.


This property is superseded by IncludeSubSitesInNavigation such that, even if this property is set to true, if the specified property of the parent Web site is set to false, this Web site does not appear in navigation.

Setting this property causes the parent PublishingWeb to be opened, modified, or updated. This action can make other instances of the same PublishingWeb stale. The IncludeInNavigation(Boolean, Guid) or ExcludeFromNavigation(Boolean, Guid) methods may perform better when showing or hiding several child objects of the same parent.

To save changes after setting this property, call the Update method.

See also


PublishingWeb class

PublishingWeb members

Microsoft.SharePoint.Publishing namespace