🎉 unite cms v0.6 was released today including this 5 new features
Today we released version 0.6 of unite cms. This minor release focuses on new features for defining complex content structures and on better integration with other systems. Beside some bug fixed and little enhancements, this are the new main features that are already available on unitecms.io:
1. Variants field type
With the variants field you can define multiple variants of fieldsets, your content editors can choose from.Variants fields can be used if you want to create a dynamic content schema, for example a “name” in a CRM: For a company this would be the company name, for a person it would be the combination of a firstname and lastname field:
Together with the collection field, a variants field can also be used to define dynamic website layouts.
If you come from Drupal or Wordpress, this is very similar to the Paragraphs module or the Gutenberg editor. In fact, in one of the next releases we will introduce an option that will change the appearance of the variants field to look more like a seamless editor (like Medium).
2. Live preview
One of the headless CMS drawbacks is, that content editors will work with content out of it context (for example on their website). To make it more easy for content editors to see the final result while editing content, unite cms now allows to define an preview endpoint that will get rendered in an iframe next to the update form. The content editor can even switch between three viewport sizes to see how the result will look like on different devices.
Note: If you are using unite cms to manage content for any non-web project, you can sill create an live preview endpoint of a mock of your application. This way you can create a (mocked) live preview even for native apps or ioT applications.
This feature request was on our roadmap from the very beginning and we are glade that we finally implemented webhooks in unite cms. Webhooks are HTTP request to other webservices, that get fired when content was created, updated or deleted. This brings many different possibilities like cache invalidation of a decoupled frontend, triggering static site generator builds (I look at you Netlify).
When defining webhooks in unite cms, you can also include a GraphQL query to tell unite cms which data should be included and a condition to define exactly when the webhook should be sent:
While this is a very straight forward example, query can also include deeply nested data and condition can be a very complex expression too. Because of this, webhooks can be the core of your very custom business logic like defining who receives an email after a webshop purchase.
We are very exited to see what you will build with it!
Starting with version 0.6 you can define custom validations for your content and setting types. Validations (like webhooks) consist of a expression that must be valid and a message that will be shown if not. Inside the expression you can access all the content’s data and define any kind of expressions that must be validated to true.
Here are some inspirations what you can do:
5. Persist flag for GraphQL mutation API
The final feature we will introduce here is a very small one but will have a big impact: From now on, when using the GraphQL mutation API, you must pass a persist flag that tells unite cms if you want to save the change to the database or not. This allows you to validate content without actual saving it and to test the mutation endpoint. If you are already using the mutation API, please make sure that you include the persist flag, since it is required.
One more thing
With the release of version 0.6, we also want to introduce our new gitter.im channel where you can get help, talk to other developers or suggest new features.