Warning: You are browsing the documentation from version 4 to 10 of Pimcore. Please visit https://pimcore.com/docs/platform/ for the latest versions of Pimcore.
Version:

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 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 Add

Headless Document Settings

Save And Reload:

Headless Document