New answers tagged

0

It seems that the easiest way to generate a url is to use View Modes. I created a new Media view mode. Then go to Media types > Image > Manage display and scroll to the very bottom and click on Custom display settings. Check the box next to the new media image to add it to display. then select the new media type to customise it. Under Format use the ...


0

If you are configuring the view with the fields. You can try setting the formatter of the image to 'URL to image' and then create the HTML yourself like <img src="{{ view.field.field_slide_media }}" /> Or you can try file_url


0

Here's another way to do this. This example exclude the use of the Title field. {% set link_url = content.field_link.0['#url'] %} {% set link = link_url ? link_url : content.field_link.0['#title'] %} {% if link %} {{ link.toString() }} {% endif %} Possible results # Input ---------------- Output ----------- # This is a node (23) /relative/url # <...


Top 50 recent answers are included