1

I have a custom block with four fields like this :

custom block type

I want to display in twig the value of image's uri. I've tried something like that in field--block-content--field-linkedin-link--rs.html.twig template:

{%  for item in items %}
   {{ file_url(item.entity.uri.value) }}
{% endfor %}

and this :

{%  for item in items %}
    {{ item.0['#url'] }}
{% endfor %}

Nothing works.

Any idea please?

Thanks a lot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.