Wednesday 01 July 2015 3:10:15 pm - 1 reply
Hello,I try to display an image in a newsletter template but it's a download link I get.
Do you know why?Here's the code:
{attribute_view_gui attribute=$article.data_map.visuel image_class='small'}
Thanks
Patrick
Tuesday 07 July 2015 8:31:19 am
Hi.
The code you show us is old legacy code. With eZ Publish 5, I would recommend using the following twig helper :
- To simply display your image :
{{ ez_render_field(content, 'image') }}
More information on ez_render_field()
- To get the url of your image :
{{ ez_image_alias(content.getField('image'), content.versionInfo, 'aliasName').uri }}
More information on image aliases
Hope it helps
You must be logged in to post messages in this topic!