Method: Scrivito::AttributeContent::ClassMethods#hide_from_editor

Defined in:
app/cms/scrivito/attribute_content.rb

#hide_from_editorObject

This method prevents UI users from creating Objs or Widgets of the given type. It does not prevent adding such objects programatically.

By default, hide_from_editor is false.

Examples:

Hiding error pages:

class ErrorPage < Obj
  hide_from_editor
end

Hiding admin widgets:

class AdminWidget < Widget
  hide_from_editor
end


650
651
652
# File 'app/cms/scrivito/attribute_content.rb', line 650

def hide_from_editor
  @hide_from_editor = true
end