Configuration

By default, headless template and brick configurations are stored in Symfony config yaml files (under var/config/headless-templates & var/config/headless-bricks). It is also possible to store these configurations in settingsStore(database layer).

You can change the write target for each type by using environment variables. The following target options are available:

  • symfony-config - write configs as Symfony Config as YAML files
  • settings-store - write configs to the SettingsStore
  • disabled - do not allow to edit/write configs at all

Available environment variables are:

PIMCORE_WRITE_TARGET_HEADLESS_DOCUMENT_TEMPLATES=settings-store
PIMCORE_WRITE_TARGET_HEADLESS_DOCUMENT_BRICKS=settings-store

Note: These configurations are merged from yaml files & settinsStore on loading & usage on headless documents. If you switch to a particular storage target, then migration & cleanup is required to be performed manually.

Grouping

It is possible to group configurations on editing interface with group property as follows:

pimcore_headless_documents:
    templates:
        test:
            group: Test
            layout: simple
            ...
pimcore_headless_documents:
    bricks:
        area1:
            group: Test
            type: brick
            ...

Custom Views & Perspective

Just like other document types, you can hide/show headless documents from context menu in perspectives custom view with following configuration:

[
    'treetype' => 'document',
    'name' => 'Basic Examples',
     ...
    'treeContextMenu' => [
        'document' => [
            'items' => [
                'addHeadlessdocument' => 0, // hide "Add Headlessdocument"
                ...
            ]
        ]
    ]