How to render a region in custom module twig template
Question
I have rendered regions in page.html.twig using {{ page.region_name }}
. But it doesn't work for the custom modules template. How can I render a region in custom template?
Solution
I'd recommend to install the Twig Tweak module: It provides (amongst others) an operator for that:
{{ drupal_region('my_region_name') }}
Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange