We want the real image, and just the link URL

(We'll switch to getting just the URL in the field display configuration.)
This commit is contained in:
benjamin melançon 2018-11-21 10:35:34 -05:00
parent 7b4bcb3aed
commit 6dc408619b
2 changed files with 3 additions and 7 deletions

View file

@ -1,4 +1,4 @@
<a href="{{ link }}" class="media teaser"> <a href="{{ url }}" class="media teaser">
<div class="media-left"> <div class="media-left">
{{ image }} {{ image }}
</div> </div>

View file

@ -1,12 +1,8 @@
{% set item_attributes = create_attribute().addClass(item_classes) %}
{% import "@bulma/macros/renderables.html.twig" as renderables %}
{% set link = renderables.merge_attributes(item_attributes, content.field_link, 0) %}
{# Include slide component template. #} {# Include slide component template. #}
{% {%
include '@agaric/components/slide.html.twig' with { include '@agaric/components/slide.html.twig' with {
classes: classes, image: content.field_image,
image_url: content.field_image[0]['#markup'],
text: content.field_text, text: content.field_text,
link: link, url: content.field_link,
} only } only
%} %}