How do I show a block in a region? All blocks in the footer region use a CSS grid system. I want to add a &lt;div&gt; with CSS attributes to each (custom) block in the footer. The code I have will show the blocks in the footer, but will give an error. Changing {{ key }} to {{ key.content }} is not helping. I am using Drupal 8.6.8.

The code that I am using in the page.html.twig template is the following.

{% for key in page.footer %}
    &lt;div class="col col-4"&gt;
        {{ key }}
    &lt;/div&gt;
{% endfor %}


Using that code, I get this error message.


  User error: "0" is an invalid render array key in Drupal\Core\Render\Element::children() (line 97 of core\lib\Drupal\Core\Render\Element.php).
Remove array keys starting with '#':

{% for key, block in page.footer if key|first != '#' %}
    &lt;div class="col col-4"&gt;
        {{ block }}
    &lt;/div&gt;
{% endfor %}