Creating a custom container block ================================= Containers are blocks like any other, so everything described in chapter on creating a custom block applies here. The difference between regular blocks and containers is that containers can contain other blocks. This is achieved by using something called a placeholder, which is nothing more than a label which is applied to every child block in a container. When rendering the container, you can use this label to specify where in the template will all blocks with that label be rendered. As with zones, all blocks with a specified label will be rendered one after another. Think of a placeholder in the container block as a lightweight variant of a zone in a layout. When you drag and drop a new block to a placeholder in a container, placeholder label is automatically assigned to the new block so it can be rendered when requested. .. note:: Currently, it is not possible to add containers within containers. Container definition handler ---------------------------- When creating a custom block definition handler for a container block, in addition to extending from ``Netgen\Layouts\Block\BlockDefinition\BlockDefinitionHandler`` abstract class, you will need to implement ``Netgen\Layouts\Block\BlockDefinition\ContainerDefinitionHandlerInterface``. What is left for you to do is to define which placeholders your new container block has by implementing ``getPlaceholderIdentifiers`` method. For example, ``Two columns`` container block provided by Netgen Layouts looks like this: .. code-block:: php