Set up content item previews

Set up content item previews

This article explains how to set up a preview for content items.


Automatically generate preview links for a content item to allow editors to preview their content directly in Prepr. This way they can review content items in a front end before they are published.

Set up preview URLs

You can set up preview URLs for multiple environments like production, acceptance, test, and development. Preview URLs are defined for a specific model.

To add one or more preview URLs, follow the steps below.

  1. Go to the Schema tab and choose the model you want to update.
  2. Click the Settings button at the top of the model and click the Preview URLs tab.
  3. Enter a name and the preview URL construct for this model. You can use {id} and {slug} variables for your construct. Example:{slug}.

Add review URLs

You can add an unlimited number of preview URLs to the model. The first name you set will be shown as default in the content items of this model.

If you loaded demo data in your environment then you'll notice a Preview URL on the Article and Page models. This URL renders the content item in the Prepr Example site.

Show content items that are not yet published

Accessing unpublished content can be useful for previewing how a new content item will look before making it available to everybody. The GraphQL API gives you control over whether you want to access published or unpublished content items in the front end.

To show content items that are not yet published in the front end, use the GraphQL Preview access token created by Prepr during the initial environment setup. With this access token, you can retrieve content items in all available workflow stages, including To do, In progress, Review, Done, and Published. The content editor can then review them and make any necessary changes before publishing.

Alternatively, you can create a new access token yourself and define token permissions according to your specific needs. Read more about GraphQL permissions.

Was this article helpful?

We’d love to learn from your feedback