Multiple Documents Select

Like Document Select, but multiple documents can be selected. Good for referring multiple documents.

Settings

Basic

  • Name: The human-friendly name of this field.
  • Data Key: The field name in published data. It must be in UpperCamelCase.
  • Description: The description of this field, should be a human-friendly text shown for content editor.
  • Hidden: Hide this field from the template. Used to create document with hidden default values. It is recommended that put this field to bottom.

Options

  • Allow duplicates: Allow selecting a document multiple times.
  • Document group: Specified which document group to select document from. Note: only multiple documents mode document group can be selected.

Default

The default value of this field when create a new document based on this template.

Transform

This field can be transformed to Document Select.

Publish

Data Key is set as relatedPosts and select two posts in posts document group.

JSON data

The value of this field will be published as a string array, ids of the selected document.

{
    "relatedPosts": [
        "d_0cblsr6eno",
        "d_er5am0capi"
    ]
}

GraphQL API

The value of this field will be published as a object array, contains all fields of the selected document.

{
    "relatedPosts": [
        {
            "title": "test1",
            "postTime": "2022-01-01T05:00:00Z"
        },
        {
            "title": "test2",
            "postTime": "2022-01-03T05:00:00Z"
        }
    ]
}
Last Updated: