Created
August 9, 2016 05:53
-
-
Save bogomolov-dev/97eb249e9fb8f2c6b87bae2a46e78b13 to your computer and use it in GitHub Desktop.
Bildstil (image style) im Template überschreiben - Drupal 8
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
{# main image #} | |
<ul{{ attributes.addClass(classes) }}> | |
{% for item in items %} | |
<li{{ item.attributes.addClass('field__item') }}> | |
{{ item.content }} | |
</li> | |
{% endfor %} | |
</ul> | |
{# thumbnails #} | |
<ul class="gallery__navigation"> | |
{% for item in items %} | |
<li class="gallery__navigation-item"> | |
{% set content = item.content %} | |
{% set content = content|merge({'#image_style': 'my_thumbnails_style'}) %} | |
{% set item = item|merge({'content': content}) %} | |
{{ item.content }} | |
</li> | |
{% endfor %} | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment