Skip to main content
Version: 2024.2

Headless Bricks

Headless Bricks are extension of Pimcore area-bricks, with an exception that you don't need to define a brick class implementing AreabrickInterface to register brick on the system and use it on the document. Instead, just define brick structure on Symfony Configuration either in var/config/headless_bricks or in settings store.

These bricks can be defined and used on headless documents with bricks configuration, which defines the master headless bricks to be used on template configurations.

Brick Configuration Interface:

Headless Brick Configuration InterfaceHeadless Brick Configuration InterfaceHeadless Brick Configuration Interface

Bricks configuration example: var/config/headless_bricks/teasers.yaml

pimcore_headless_documents:
bricks:
teasers:
type: brick
items:
teaser_1:
type: snippet
teaser_2:
type: snippet
gallery:
type: brick
icon: '/bundles/pimcoreadmin/img/flat-color-icons/like.svg'
group: 'Gallery'
items:
image:
type: image
config:
width: 200
height: 200
thumbnail: gallery

Bricks usage example: var/config/headless_templates/example.yaml

pimcore_headless_documents:
templates:
example:
content:
contentBlocks:
type: areablock
config:
allowed: ['teasers', 'gallery']