Set a Document's Display Name
Define how the display name appears in the document list.
There are three ways to set document display names in Prismic:
- Manually. Set it directly in the editor
- Automatically, with the
useAsTitle
property - Or by default. The first text is used
Manual display name
Click the document name at the top left of the editor to enter a new one. This will overwrite the automatic or default name and won’t change unless you update it manually.
Automatic display name
In the model.json
of your Slice or Page type, edit the field where you want to define the document’s display name. Only Rich Text, Text, and UID fields are supported.
In that field’s config object, add the property useAsTitle": true
.
Keep in mind: this setting only takes effect the first time you save it. If you edit the field afterward, the changes won’t be reflected.
"title" : {
"type" : "Text",
"config" : {
"label" : "Title",
"useAsTitle" : true
}
}
Default display name
If no name is specified, the first heading in the document will be used as the display name. If there are no headings, the first paragraph or text will be used instead.