--- title: li-document-reference description: "Shows a reference to another document." --- ## Supported Features | Feature | Supported | | ------- | :-------: | | Document | ✔ | | Media | ✔ | | Include | ✔ | | Document Creation Flow | ✔ | | Push Message | ✔ | | Usage Log | ✗ | | Table Dashboard | ✔ | | Display Filter | ✔ | | Search Indexing | ✔ | | System Metadata | ✗ | | Planning System | ✗ | | Webhook Conditions | ✗ | ## Description A `li-document-reference` metadata field shows a reference to another document. To select a document one gets provided a Document Selection Modal. [Display Filters](/customising/advanced/editor-configuration/display-filter/llms.txt#metadata-filters) support Added in: [`release-2023-09`](/operations/releases/release-2023-09/) ## Default UI Selected document, or document selection dialog ![image](../images/li-document-reference-ui.png) ## Storage Format ```js { $ref: 'document', reference: { id: } } ``` ## Content Type Config ```js { handle: 'myContentType', // ... metadata: [ { handle: 'myHandle' type: 'li-document-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 documentType: 'article', // optional, one of article, page, data-record contentType: 'my-content-type', // optional, filters the document selection published: true, // optional, shorthand for publication displayFilter, default: false prefillAuthor: true // optional, set value to document creator if the prefilling configuration for the current user exists, default: false. Added in release-2023-09 }, ui: { label: 'foo', // optional, takes camelized handle otherwise config: { style: 'default', // optional, defaults to 'default'. Other options: 'teaser' | 'minimal' useDashboard: '', // optional, reference to a custom dashboard baseFilters: [], // optional, extends base filters from the dashboard specified in useDashboard displayFilters: [], // optional, overrides display filters in selection dialog cacheSearch: false, // optional, used to persist search query and filters when reopening search dialog, default: false readOnly: false // optional, default: false } } } // ... ] } ```