Defining views
The default administration UI for documents configures a number of CRUD pages per document type:
-
an overview page (list) of all documents of that type
-
forms for creating, updating and deleting a document of that type
These pages are built using EntityModule views, and some can be customized by providing a view definition.
View definition
A dynamic view consist of a number of properties that should be rendered on a specific view. A dynamic view is registered for a specific dynamic document through a parent-child relationship, where the document definition is the parent of the view definition. Depending on the view type, additional configuration options may be available, for example on a list view, filter controls may be defined.
A single definition requires at least
- a name
-
The
name
defines on which view the definition will be applied. E.g. a definition with namemy-custom-view
would be applied on a view with namemy-custom-view
. - a type
-
The
type
defines on views of which type the definition will be applied. E.g. a definition with typelist
would be applied only on list view configurations. - a list of properties
-
The list of properties is a listing of the properties of the parent document that should be rendered on the view.
- a parent document definition
-
A view definition always configures views for a specific document.
The combination of name
and type
must be unique in the scope of its parent, as only one view configuration can be applied to a specific view.