Preview Links
Preview links let editors open the current entry on your frontend in draft mode before it is published. Contismo builds the URL from a template you configure on each content model; your site validates the request and loads draft content from the GraphQL API.
Configure a preview URL on the model
Section titled “Configure a preview URL on the model”Each content model supports one preview URL template (a full URL, not just a path).
- Go to Models → Content Models and open the model.
- In the Preview URL section, enter a full URL pattern.
- Use tokens for dynamic segments (see the reference table in that section, or below).
- Save the model (use the model editor save action so the template is stored).
Example template:
https://staging.example.com/api/draft?secret=YOUR_SECRET&redirect=/blog/{field.slug}Staging and production usually use different environments in Contismo, each with its own template pointing at the matching host.
Available tokens
Section titled “Available tokens”| Token | Value |
|-------|--------|
| {entryId} | Entry ID |
| {locale} | Locale API ID |
| {model} | Content model API ID (singular) |
| {modelPlural} | Content model API ID (plural) |
| {status} | Entry status (DRAFT, PUBLISHED, …) |
| {environment} | Environment API ID |
| {field.<apiId>} | Field value by field API ID (for example {field.slug}) |
Token values are URL-encoded when the link is built from saved data. Preview is only available for existing entries. If a required token is missing on the saved entry, the control stays disabled until you save with that field filled in.
Open preview from the entry editor
Section titled “Open preview from the entry editor”When a template is configured, the entry editor toolbar (top of the page) shows a Preview button control:
- Open Preview — opens the resolved URL in a new tab
- Copy (clipboard icon) — copies the resolved URL;
If required tokens are missing, the control stays disabled and a tooltip explains what is needed (for example, save the entry first when the template uses {entryId}).
The link uses saved entry data (the last version stored in Contismo). Save the entry first if you are creating it or changed fields that appear in the URL (for example {field.slug}).