ajaxyfied image links, fix #3

This commit is contained in:
Bachir Soussi Chiadmi
2018-03-13 20:17:01 +01:00
parent 76565a8b28
commit a0e7fa5f2c
3 changed files with 55 additions and 11 deletions
@@ -0,0 +1,19 @@
{#
/**
* @file
* Theme override to display a formatted image field.
*
* Available variables:
* - image: A collection of image data.
* - image_style: An optional image style.
* - path: An optional array containing the link 'path' and link 'options'.
* - url: An optional URL the image can be linked to.
*
* @see template_preprocess_image_formatter()
*/
#}
{% if url %}
<a href="{{ url }}" {{ link_attributes }}>{{ image }}</a>
{% else %}
{{ image }}
{% endif %}