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.

Set a display name manually

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.

Set display names automatically

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.

Use default display names

If no title is otherwise specified, Prismic will take the first heading in the document as the display name. If there are no headings, Prismic will use the first paragraph or key text that it finds.