Scrivito JS SDK 1.33.0 Released

Featuring placeholders for data items

Weaving data into website content using placeholders

Editors can now insert placeholders representing specific pieces of data into textual website content, e.g., for personalization purposes. When the website is then visited, these placeholders are dynamically replaced with data provided by the application. This makes it possible to complement CMS-based content with information related to the current user, account or context, i.e., names, email addresses, statuses, and the like.

For making such data available, the Scrivito SDK now offers the Scrivito.provideDataItem API.

Introducing data locators

This release introduces the new datalocator attribute type that enables editors to embed dynamic functionality into pages or widgets, i.e., integrate logic that previously required the help of a developer.

Data locators can be used in many ways. This release features the initial set of APIs for DataLocators that we are going to expand in the course of the next few releases. We are also working on further examples to show you what they are capable of.

Note that these APIs are still considered beta, meaning that we will try to keep them stable. However, we still may need to introduce some smaller breaking changes. For now, let’s address two of the many use cases for data locators, dynamic lists and personalization.

Dynamic lists

One of the use cases for data locators is building “list widgets” that enable editors to create dynamic lists of CMS content. When used inside such a list widget, a data locator allows you to choose the type of content the list should contain. For example, you could add a widget with a datalocator attribute to the overview page of a blog to create a dynamic list that displays pages of the “Blog Post” type.

Data locators also support filtering. If a website has multiple kinds of blogs, for example, you could specify that the list on the “Tech Blog” overview page should only include blog posts that have been tagged as “tech”.

Furthermore, data locators also let you limit the number of results in order to specify, for example, that at most ten blog posts are to be shown.

And finally, data locators support sorting, so you could have the blog overview start with the most recently published posts.

Personalization

The new datalocator type can also be used to implement functionality that makes use of “external” data sources rather than CMS content, e.g., data that is provided via the new provideDataItem API.

This enables editors to build widgets for website personalization, e.g., widgets that display content depending on specific conditions.

As an example, with the help of such a widget, you would be able to choose “Logged-in user” as the data source and then apply the “admin” is “true” filter to make a particular part of the content only visible if the user is an administrator.

Further improvements

  • Custom icons for the Content Browser

    Locating and browsing assets of a specific type can now be made easier for editors.

    Developers can now place any icon in the Content Browser filter section, meaning that providing visual clues is no longer limited to the predefined icons. See the API documentation for details.

  • Hot reloading of widgets

    The support for “Hot Module Replacement (HMR)” in Vite and “Hot reloading” in Parcel has been improved so that they now also work for widgets.


  • Fixed link editor

    Adding a new HTML link to text that already contains a link no longer causes nested or empty link tags.

Thank you for using Scrivito!

More great blog posts from Andreas Viebke

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.46.0 RC 2 Released

    Interface Builder improvements Using attributes of the current page context Attributes of the current page and its ancestors are now available to editors as placeholders and as a data source (datalocator). Note that only attributes of the string type that are also included as attributes in the...

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.45.0 Released

    Interface Builder Supports Further Attribute Types for Filtering

    Interface Builder improvements Filtering data by enum, boolean, date, and number attributes The Interface Builder’s data editor now also lets you filter data by attributes of the enum , boolean , date , and number types. This makes it much more convenient and intuitive to select and present data...

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.44.2 Released

    Bugfix Release An issue with Scrivito.useDataLocator has been fixed. It prevented filters with reference data attributes from being evaluated properly. We apologize for any inconvenience this issue may have caused! Thanks again for using Scrivito!

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.44.1 Released

    Maintenance release This is a maintenance release with minor improvements. As always, we will keep you posted if there is anything interesting to report. Stay tuned! Thanks again for using Scrivito!

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.44.0 Released

    Interface Builder improvements LinkTag supports data items The LinkTag component now supports data items as navigation targets. Passing a DataItem to the to prop causes the link to point to the details page of the item concerned. Accessing current data of a specific class The useDataScope and...

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.43.0 Released

    Interface builder improvements Data attributes For the application to utilize the attributes selected by content editors, the Scrivito SDK now includes a (beta) API for representing data attributes, DataItemAttribute . A data item attribute can be accessed from a data item via...

  • Providing Data Classes with Custom Attributes

    Latest updates to edit.scrivito.com

    Defining custom attributes via the Interface Builder’s data editor The data editor now lets you add custom attributes to data classes. If, for example, you have a “Current user” data class that requires an attribute not specified in the editing configuration of this class, e.g., “email”, you can...

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.42.1 Released

    Bugfixes Data integration issue > DataItem#get > no longer requires a loading context, i.e., > Scrivito.load > or > Scrivito.connect > . We apologize for any inconvenience the above issue may have caused! Thank you for using Scrivito!

  • Scrivito Enterprise CMS - Product Illustration

    Scrivito JS SDK 1.42.0 Released

    Interface Builder improvements DataScope#limit() API method The new DataScope#limit() method determines the maximum number of data items a DataScope may contain. It returns either a number indicating this limit, or undefined if no limit is set. Introducing Scrivito.currentLanguage()...

  • Introducing the ​New Data Editor

    Latest updates to edit.scrivito.com

    > > As you may have noticed, we have been continuously refining and expanding the Interface Builder. Now the time has come for a correspondingly enhanced data editor. > > The new data editor comes with an intuitive interface that provides a visual representation of a data locator as well as...