All blocks in the footer region use a CSS grid system. I want to add a <div>
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 %}
<div class="col col-4">
{{ key }}
</div>
{% 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).