Gets a has array list of renderings that should be removed from the list of default renderings.
An array list of rendering names or IDs.
Default renderings are the renderings specified as part of the current layout. For instance the Home layout may have a Document rendering.
When builing a programatic layout using AddRenderings and DisableDefaultRenderings, it is possible to remove default renderings.
The following code adds the SpotBox rendering to the page, and removes the Document rendering, if the user is logged into the extranet.
public PersonalizePage() {
if (ExtranetSecurity.IsLoggedIn) {
State.AddRenderings.Add("SpotBox");
State.RemoveRenderings.Add("Document");
}
}
State Class | Sitecore.Configuration Namespace