Skip to main content
Version: 2023.2

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).

Example Config for Template and Brick Are:

pimcore_headless_documents:
config_location:
headless_templates:
write_target:
type: 'symfony-config'
options:
directory: '/var/www/html/var/config/headless_templates'
pimcore_headless_documents:
config_location:
headless_bricks:
write_target:
type: 'symfony-config'
options:
directory: '/var/www/html/var/config/headless_bricks'

You can change the write target for each type using the config.

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

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"
...
]
]
]