Set a Document's Display Name
You can control the display name that appears on a document in the document screen.
There are three ways to set document display names in Prismic:
- manually, in the document header;
- automatically, with the
useAsTitle
property in your custom type; - or by default.
To manually set the display name, click on the document's display name in the menu bar of the editor and enter a title. This title will overwrite any default display name, and it will not change unless you edit it manually.
In the custom type JSON editor, you can specify what field to use as the document display name. The first time you save the document, Prismic will take the display name from this field. If you edit the field again, the changes will not be reflected in the display name.
In the config
object for that field, add a property called useAsTitle
with the boolean value true
:
"title" : {
"type" : "Text",
"config" : {
"label" : "Title",
"useAsTitle" : true
}
}
This setting is most often used with the UID, rich text, and key text fields. It also works with the date, timestamp, color, number, select, and embed fields.
Can't find what you're looking for?
Need technical Support? Spot an error in the documentation? Get in touch with us on our Community Forum.