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:

Add additional Area Bricks

Area bricks are principally implemented the same way as described in the Pimcore documentation.

The only difference is that the area brick class needs to extend the Pimcore\Bundle\PortalEngineBundle\Document\AbstractAreaBrick class. As soon as a service with this parent class is registered in the service container with the tag pimcore.area.brick, the area brick will be provided on portal and content pages.

# a service.yml file defining services
services:
   # needs to extend Pimcore\Bundle\PortalEngineBundle\Document\AbstractAreaBrick 
   AppBundle\Document\Areabrick\TestArea:
       tags:
           - { name: pimcore.area.brick, id: testarea }