Custom Entities
Core dna comes pre-configured with commonly used entities such as pages, blog posts, and products. These predefined entities can be customized through the layouts, offering users an easy start with a basic setup while still allowing them to adapt the system to their specific needs.
However, one limitation of this approach in the past was the necessity to use predefined entities. For example, an event listing would have to be structured as a blog post.
With the introduction of custom entities, we now provide users with the capability to create their own entities from scratch. Watch the demo video below to see how easy it is to create a new custom entity, in this case for Events:
Custom entities offer extensive built-in functionality and support a wide range of configuration options and possibilities:
- Relationships
- Custom entities support defining relationships between entities on a granular level. Every relationship can be limited to support a single custom entity (like in traditional data model design), but also be configured to accept records of multiple different entities. Furthermore, minimum and maximum supported records for a relationship can be defined and will be validated on saving of records. As an example, when defining an event entity, this could have two relationships: artists requiring min. 1 record and location with min. 1 and max. 1 record.
- Hierarchical structure
- To improve the editor experience, custom entities also support defining a tree-like data model structure through definition of parent entities. This way, child records can be directly created and edited from a hierarchical view. As an example, you could create an entity tour and as child entity event, so that all events are shown (and can be created) as part of the tour.
- Layout areas
- Similar to definition of data models for pre-defined entities through layouts, custom entities support definition of areas with the same input types available for all other entities in the system. As such, you can not only add plain text or image fields to the custom entity, but also define more complex structures with components and collections.
- Versioning and permissions
- All custom entities support content versioning without need for any additional configuration. Additionally, permissions can also be configured on custom entities as well, with support for permissions defined for the entire custom entity as well as individual records.
- Optional features
- Custom entities support a variety of additional features that can be enabled if needed:
- Site specific entities are only visible on the respective site
- Publishable entities can be published (also scheduled) and will only display on the frontend if published
- Positioned entities allow manually assigning a position to the records and will deliver the records based on this positioned
- URL addressable entities can be accessed in the frontend via a URL - if this is disabled, the records will only be accessible through API or when embedded in other entities
- SEO settings can be enabled for entities and are then available for every record as well as for the listing
- Categories and tags can be enabled for entities and accordingly support adding tags and categories to records as well as listing records matching the specific category or tag
- An admin menu element can automatically be added for listing records of the custom entity