Better collections with Create.js

Copenhagen has been the last stop of the current Create.js tour. In here we've been integrating VIE and Create into TYPO3 Phoenix, the next major version of this popular CMS.

As usual, this collaboration has ended up in some new features in the libraries. The major one of these is more flexible collection handling.

In previous Create.js versions, collection handling was pretty simplistic. Essentially you could only add a single type of content into each of them:

Create will use the first entity inside a collection as a “template”, and knows how to add or remove entities from the collection. In Edit mode the user would see an Add button next to the collection.

The new version brings some quite powerful additions to this.

Choosing type of content to add

  • Support for adding items to anywhere in the collection. To the beginning, to the end, between existing items
  • Ability to choose between type of content to add, if the collection type allows different types (ranges in VIE)
  • Limiting collections to a minimum and maximum number of items if needed
  • Using custom (and even server-generated) templates for the new added items

Create.js documentation has not yet been updated to cover these features, but you can see them in action in the type-based Create.js example.

In the other news

As mentioned on my previous post on Drupal and cross-CMS collaboration, Create.js and VIE are being considered for the Spark Edit module. There is now a ticket open where discussion on this is happening. If you're interested in Drupal and Create.js, feel free to participate!

Written on a houseboat in Copenhagen harbor, where the code sprint is being held.


Read more Decoupled CMS posts.