Skip to main content
Version: 2023.2

Headless Documents

A Headless document type represents a typical web-page, which can be rendered only in Admin UI. The content structure is defined by the template configuration, which defines the layout and editables to be rendered on the document.

This Headless Document is purely based on template configuration to render editables for content structure. These template configuration are Symfony config, which can be a yaml file (e.g. var/config/headless_templates/example.yaml) or settings store database entry.

An example of template configuration is:

pimcore_headless_documents:
templates:
example:
content:
headline:
type: input
config:
placeholder: 'Headline'
required: true

selectTest:
type: select
config:
store:
- ["one-month", "One month"]
- ["three-months", "three-months"]
- ["unlimited", "unlimited"]

mainContent:
type: wysiwyg
config:
height: 200

images:
type: block
items:
image:
type: image

Template Configuration Interface:

Headless Template Configuration InterfaceHeadless Template Configuration InterfaceHeadless Template Configuration Interface

Once the template configuration is ready, the next step is to add a headless document and select the template in document settings.

Headless Document AddHeadless Document AddHeadless Document Add

Headless Document SettingsHeadless Document SettingsHeadless Document Settings

Save And Reload:

Headless DocumentHeadless DocumentHeadless Document