Method: Scrivito::BasicObj.valid_page_classes_beneath

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

.valid_page_classes_beneath(parent_path) ⇒ NilClass, Array<Class>

Hook method that lets you control which page classes are made available for pages with the given path. Override it to allow only specific classes or none at all. Must return either NilClass, or Array.

Be aware that the given argument is a parent path. E.g., when creating a page whose path is /products/shoes, the argument must be /products. The given parent path can also be NilClass.

If NilClass is returned, all page classes are made available. By default, NilClass is returned.

If an Array is returned, it is expected to contain the available classes. The order of the classes is preserved.

Parameters:

  • parent_path (String, NilClass)

    Path of the parent obj

Returns:

  • (NilClass, Array<Class>)


370
371
# File 'app/cms/scrivito/basic_obj.rb', line 370

def self.valid_page_classes_beneath(parent_path)
end