I have a sidebar region "Sidebar Ad" and placed in that region is the custom block "Sidebar Ad" of type "Image" which has two fields "Image" and "Link".
When I output the block on my page using {{ page.sidebar_ad }}
, I get the image and the link separate from each other, which is to be expected. What I can't figure out, and I've been trying for around 5 hours now, is how to reference the fields separately so I can wrap the link around the image.
Does anyone know how to reference those fields? Am I going about this the wrong way?
I've successfully pulled the link URL by overriding the specific block template and referencing:
{% block content %}
<a href="{{ content.field_link.0['#url'].uri }}"></a>
{% endblock %}
Referencing the image URL still eludes me.