li-reference

Deprecated in: release-2023-09

Removed in: release-2023-11

Supported Features

Document
Media
Include
Document Creation Flow
Push Message
Table Dashboard
Display Filter
Search Indexing
System Metadata
Webhook Conditions

Description

With release-2022-03 this is superseeded by li-document-reference.

Shows a reference to another document. A Document Selection Dialog is shown, based on shorthand queries and useDashboard to select documents.

Default UI

Document selection dialog.

image

Storage Format

{
  $ref: 'document',
  reference: {
    id: <String>
  }
}

Content Type Config

{
  handle: 'myContentType',
  // ...
  metadata: [
    {
      handle: 'myHandle'
      type: 'li-reference',
      config: {
        // common
        hideFromForm: false,                     // optional, default: false
        required: true,                          // optional, default: false
        requiredErrorMessage: 'Provide a value', // optional
        index: true,                             // optional, default: false. Added in: release-2023-07
        // specific
        referenceType: 'document',
        documentType: 'data-record',             // optional, one of article, page, data-record
        contentType: 'author',                   // optional, content type handle (or array)
        prefillAuthor: true                      // optional, default: false
        published: true                          // optional, shorthand for publication baseFilter, default: false
      },
      ui: {
        label: 'foo',                            // optional, takes camelized name otherwise
        config: {
          displayFilters: ['timeRange']
        }
      }
    }
    // ...
  ]
}