👀 See Sanity in action: Watch product demo now →

How to Concatenate 2 Values for the Preview Title

2 replies
Last updated: Jun 13, 2022
hey all, is it possible to concatenate 2 values for the
preview
title ? In my case I'd like to merge the number into the title such that it could appear on the left as "172 - Il faut que tu ruines tout". Thanks!
Second question, is
this really the only way to go about creating singleton pages in Sanity? seems awfully convoluted.. there must be a better way, no?
Jun 13, 2022, 2:42 PM
You can use
prepare()
to reformat your preview, like this
preview: {}
Jun 13, 2022, 4:29 PM
You can use
prepare()
to reformat your preview, it’s all well documented here: https://www.sanity.io/docs/previews-list-views
Jun 13, 2022, 4:34 PM

Sanity.io – build remarkable experiences at scale

Sanity is a customizable solution that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Categorized in