Skip to content

Instantly share code, notes, and snippets.

@deanebarker
Created November 14, 2022 20:28
Show Gist options
  • Select an option

  • Save deanebarker/4f91e59ef3708c8f79e4e5ca6e63a450 to your computer and use it in GitHub Desktop.

Select an option

Save deanebarker/4f91e59ef3708c8f79e4e5ca6e63a450 to your computer and use it in GitHub Desktop.
Code to hide preview and on-page edit views for content that has no visual component
[UIDescriptorRegistration]
public class HideVisualViewUIDescriptor : UIDescriptor<[Page Type or interface>
{
public HideVisualViewUIDescriptor() : base()
{
DefaultView = CmsViewNames.AllPropertiesView;
EnableStickyView = false;
DisabledViews = new[] { CmsViewNames.PreviewView, CmsViewNames.OnPageEditView };
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment