I would like to know if it’s possible and supported (and potentially encouraged) to abstract away details in the content engine by using custom element modules to basically restrict what a CMS user should be able to edit on a CMS page?
The use case is basically a landing page where a CMS user should be able to edit a text section and an image followed by a fixed number of tiles that represent documents already present in dataservices. So the CMS user should only specify the id of the document to be shown for each tile.
Basically I would like to know if one can implement a custom element module where an actual element would look something like this:
{
"id": "some-tile",
"type": "Custom",
"namespace": "com.mgmtp.foo",
"subtype": "DocumentElement",
"props": {
"documentId": "123",
"documentModel": "DomainFooDocumentModel",
}
}
The renderer of this would need to load the document and then determine how this specific document should be rendered by consulting an element library.