Widget data - CTA Href

Esteemed Contributor

Hey guys,

 

I have a html email template that I have populated with various hubl code for use at email build level by end users.

 

Email images in the template are called from a cache, so the images won't be the same every time. They will, however, relate to the email content and CTA. So I'm exploring ways to href the images in an email to the same link that the CTA will point to. Whatever that may be.

 

I want to see if it's possible to use the hubl code:

 

{% cta "product_cta" label='Add CTA here' %}

 

 

and use widget_data to wrap the image like so:

 

 

<a href="{{ widget_data.product_cta.href }}" target="_blank">
  <img src="images/productimage.png"/>
</a>

I've not seen anything around widget_data.X.href on the documentation. So wanted to check in to see what is possible and not.

 

Let me know your thoughts, fellow gurus! Smiley Happy

 

Steve

 

Reply
0 Upvotes
2 Replies 2
Community Manager

Hi @Hawk-Steve,

 

Are you still looking for assistance with this? 

 

@Adesignl@MegatPrivy@Reg do you have any suggestions or thoughts for @Hawk-Steve?

 

Thank you,
Jenny


Did my post help answer your query? Help the Community by marking it as a solution
Reply
0 Upvotes
Highlighted
Esteemed Contributor

Hi @jennysowyrda 

 

I'd still be very interested to see if anything can be done in this nature, it opens a lot of possibilities! I've found a workaround in the meantime.

 

The recommended product for the contact is stored against a contact property, so I decided to store the recommended product url as well. We can call on this using hubl to wrap the links correctly.

 

Steve

Reply
0 Upvotes