Scrivito is proudly made by JustRelate Group in Berlin, Germany, and Wrocław, Poland.
Scrivito is proudly made by JustRelate Group

Scrivito JS 1.20.0 Released – Featuring Toggle Switches

Introducing true yes/no switches

Editors can now enable or disable content properties with a single click on a toggle switch.

In addition to the enum attribute type, which allows for any number of options (e.g. the color of a button), Scrivito now also has two-valued options built in. For adding a yes/no switch, developers have the new boolean attribute type available.

Examples for yes/no properties are activating and deactivating a specific style of a widget or page, or turning page indexing on and off.

Automatically assigning a content type to uploads

As an editor uploads a file, for example a video, to the CMS using the Content Browser, an object class matching the content type of this file needs to be determined. Instead of always having a “Download” object created from such files, Scrivito now lets you register default object classes for the content types you work with. For this, the Scrivito.configureObjClassForContentType API has been made available. This method allows you to provide a mapping between content types and the respective object classes to be applied to uploaded files.

Scrivito.configureObjClassForContentType({
  'image/*': 'Image',
  'video/*': 'Video',
  '*/*': 'Download',
})

Improved page display with multi-site setups

We further improved Scrivito’s multi-site capabilities. Visitors will no longer see blank pages after content migrated to a different site has been published but not yet fully prerendered.

API for changing links to CMS objects

Scrivito provides a new API method, Obj updateReferences. It allows you to change a CMS object’s links pointing to any other CMS object. The replacement link destinations can be freely defined using a mapping function. For example, you can change all links referencing an outdated imprint so that they point to the revised version.