Created
October 31, 2019 17:24
-
-
Save robdecker/9b502367621c976269ac6411220debf2 to your computer and use it in GitHub Desktop.
[Print items/blocks in region.html.twig] #d8 #twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# Loop through items #} | |
{% for key, child in elements if key|first != '#' %} | |
<div class="{{ loop.first ? 'class-1' : 'class-2' }}">{{ child }}</div> | |
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# Print items individually #} | |
{{ elements.machine_name_of_block }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment