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 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:
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']