Documentation

4.2 Channel dependent blocks

Channel dependent blocks are a feature that can be used to pre-define blocks on fixed positions, while using a different block per channel. 

An instance for a channel dependent block can be created by the user, within the page edit interface.

Channel dependent blocks are useful for fixed positions like banner positions, or HTML blocks with javascript code.

A channel dependent block can be defined in the template: by using the integrated_channel_block Twig function:

1
{{ integrated_channel_block('highlights', 'Highlights', 'Integrated\\Bundle\\BlockBundle\\Document\\Block\\TextBlock') }}

The first argument is the ID prefix, the second is the name, the third is the block class.

On a new channel, this will generate a button for the website manager to create the block. The block ID will be a concatination of the ID,