Solved

How to add a hyperlink to the default text in a variable syntax?

  • 28 October 2022
  • 4 replies
  • 420 views

Badge +1

Hello,

 

I’m trying to add a hyperlink to some text. When I add the hyperlink to the default property, it kills the entire variable. Thoughts on how to work around this? Top image is from block editor, bottom image is the email preview.

 

 

Thanks!

 

icon

Best answer by In the Inbox 28 October 2022, 17:06

View original

4 replies

Userlevel 7
Badge +29

Hi @SarahB93 

Thank you for posting your question in the community. 

If I am understanding this correctly you would like the text “Sign Up to Poppy Perks to Refer” as the hyperlinked text, but the actual link that is clicked is dynamically pulled in via the Profile Property Swell Referral Link.

I believe you’d want to wrap the entire lookup within the <a href> tag and type the “Sign Up to Poppy Perks to Refer” has the hyperlinked text within that tag, not in the lookup bracket.

For example:

Give $30 and Get $30: <a href="{{ person|lookup:'SWELL_REFERRAL_LINK' }}">Sign Up to Poppy Perks to Refer<a>

The end result should be: Give $30 and Get $30: Sign Up to Poppy Perks to Refer

The <a> tags add the Dynamic Swell Referral Link from the Profile Property as the URL and set the copy for what the Hyperlink will read.

I hope this helps!

@In the Inbox 

Badge +1

Thanks for your reply! I think this is close…

What I would like to do, is if a person does not have a unique swell_referral_link associated to their email, that Sign Up To Refer will appear, and it links to our website instead. If a person has a swell_referral_link then their referral link appears. 

Userlevel 7
Badge +29

HI @SarahB93 

Happy to help!

If you want to personalize the content based on if the contact has a unique swell_referral_link, you can use the Show/Hide functionality in the email editor. 

Essentially you would create two text blocks:

The first block would include the copy/hyperlink discussed above.
In the Show/Hide, you would want to use the following logic:

person|lookup:'swell_referral_link'

This logic is checking the swell_referral_link property is set. If it is set, then this block would show.


The second block would include the text to signup for the referral program and the show/hide logic would be:

not person|lookup:'swell_referral_link'

This logic is checking that the swell_referral_link is NOT SET. 

I hope this helps!

@In the Inbox 

Badge +1

Ohh thank you! I’ll try this out. 

Reply