Dawn Theme - Adding link to Image Banner

Solved
abdigital
Excursionist
12 1 0

Experiencing a really frustrating issue with my site and wanted to see if there is a solution!
 
I am using the Dawn theme and trying to wrap a link around the banner section. If I enter the anchor link MANUALLY into the theme, it works, but if I try to enter a link via the customizer, the link is stripped and not showing at all?
 
I have placed the following around the banner (including the closing </a> tag):

{% if block.settings.image_link != blank %}
<a href="{{ block.settings.image_link }}">
{% endif %}

 

As well as the following snippet into the schema:

{
"type": "url",
"id": "image_link",
"label": "Image Link"
},


 
This allows me to enter a URL on the customiser but the URL does not appear at all on the front end. In the image attached, you can see the href has been completely stripped out. As mentioned previously, if I manually enter the link into the theme then the href works. Am I missing something here?! TIA for any help

Replies 14 (14)
tedrubin80
New Member
2 0 0

I'm having the same issue - try and make an image with a hyperlink and add the schema and I keep getting a JSON error

 

eastcoastcollecting.com

 

Any help is apprecaited.

tedrubin80
New Member
2 0 0

Was it still in the image banner liquid file?

abdigital
Excursionist
12 1 0

What code have you added? All code is in the same file. Share code and a screenshot of error if possible.

gzef
New Member
3 0 0

Hello. I have the same problem. I want to do link the header banner but i cant understand where can i find the place that i must put the code. Please send me more details about this issue.

Thanks

WayneIu
New Member
1 0 0

Hi There,

I am trying to work on the same problem. 
Did you place the code into "Image-banner.liquid"? 
Also I am not seeing the original code has "block.settings.image_link".

 

It would be great if I can understand how you solve it.

Thank you very much.