Twig Blocks
Categories
Component ID
2872782
Component name
Twig Blocks
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
484
Component created
Component changed
Component body
Twig Blocks adds a Twig function to render blocks in Twig by passing in the block machine name.
To render a block, call the function in your Twig template:
{{ render_block('machine_name_of_your_block') }}
There is another module that provides similar functionality but it also has an option to turn on and allow PHP execution in the Twig templates which I didn't want to add to my project. This is just a straight-forward function to render a block.
