Post

Twig Tweak Cheatsheet

get a microcontent

get the finished peice of content

1
{{ drupal_entity('microcontent', 10, 'horizontal') }}

Get block

1
{{ drupal_entity('block_content', 6) }}

Replace ‘block_id’ with the machine name of the block you want to render.

Alternatively, you can place the block in a region via the Drupal admin interface and ensure your node template includes that region. This method doesn’t require Twig Tweak.

List all plugin id’s

if this does not work for you

1
2
{{ drupal_entity('block_content', 6) }}

try with the block uuid instead..

1
drush ev "print_r(array_keys(\Drupal::service('plugin.manager.block')->getDefinitions()));"

Then use

1
{{ drupal_block('block_content:9800000001209298112982219') }}
This post is licensed under CC BY 4.0 by the author.