Last active
October 13, 2017 22:13
-
-
Save rbayliss/0f8414a6ac15f38ac4165eac513300d7 to your computer and use it in GitHub Desktop.
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
{# | |
This is a glue template. It maps Drupal data to a simpler structure. | |
In this case, it converts the items render array into an array | |
of rendered images, then passes that into the image-grid component. | |
It also handles outputting the wrapper with the attributes Drupal | |
requires. | |
#} | |
{% set images = [] %} | |
{% for item in items %} | |
{% set images = images|merge([item|render]) %} | |
{% endfor %} | |
<div{{attributes}}> | |
{% include 'components/image-grid.html.twig' with { | |
images: images | |
} only %} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment