September 14, 2022

If you take a look at the pros and cons of decoupled/headless CMS, “no visual preview” is at the top of every list of 'cons'.

When we set out to build next-drupal, solving this issue of content preview was a top priority. This is why the very first version of next-drupal shipped with inline preview for editors: edit, view, review and publish your content right from within the Drupal admin. Seamlessly.

We are now adding personalized preview mode for decoupled Drupal.

What’s personalized preview mode?

Drupal ships with an advanced access control mechanism with support for roles and permissions. In Drupal, you can set field-level access for your content e.g. giving access to an editor to view an image field but not to regular users.

In a traditional coupled front-end, this is automatically handled for you. Before rendering content preview, Drupal will check user access and only render content that is accessible to that user's permissions.

Every user gets their own personalized content preview.

In a decoupled setup, the content preview is handled outside of Drupal. This means the developer has to implement special permission handling when requesting content. This is tricky and cumbersome to implement.

We solved this for you.

In the latest release of next-drupal, we’re shipping personalized preview mode with zero config.

How does it work?

When preview mode is enabled, the Next.js module for Drupal will generate unique and secure preview urls for the logged-in user. This preview url is signed with a secret token with access control. Every request to Drupal is then authenticated with an access token which returns content only accessible by the requesting user.

Personalized preview mode works seamlessly with Drupal’s content moderation: you can preview draft content, revisions and translations.

Check it out.

Field permissions for Image field


Personalized Preview for Admin
Previewing content as admin


Personalized Preview for Members
Previewing content as regular user

Decoupled Without Compromising the Editor

We set out to build the web's premier decoupled Drupal experience by keeping the editorial experience top of mind and we'll continue to do so. Please check out next-drupal and get in touch with any questions.