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?

Was it helpful?

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
scroll top