Skip to main content
2 of 2
added 148 characters in body
4uk4
  • 101.7k
  • 7
  • 173
  • 217

Block configuration entities need a region, but not blocks in general. Twig Tweak can generate the block config on the fly and doesn't need them to be stored in the database:

{{ drupal_block('plugin_id', {label: 'Example'|t, some_setting: 'example', setting_array: {value: value}}) }}

If you don't know the plugin and the settings, configure a block in UI temporarily and export the YAML file (/admin/config/development/configuration/single/export). You find both near the end of the file.

https://git.drupalcode.org/project/twig_tweak/-/blob/3.x/docs/blocks.md#block-plugin

4uk4
  • 101.7k
  • 7
  • 173
  • 217