How do i set href content in activity templates using a export defintion?

I’ve been attempting to insert LinkedIn URLs of users into an href attribute by using an export definition within a content block. The goal is to pull the URLs from the corresponding field on the connections page. However, the issue is that the %% export definition doesn’t seem to work within href attributes.

Is there a workaround for this, or is this functionality not currently supported?

—SOLVED—
Solution: when using a exportdefinition for hyperlinks don’t use hyphens within the export definition title. Instead use a linedash, for example website_url.

I tried to reproduce this in a small test application, and for me it seems to work.

I created an activity template (of type e-mail) and added a content block template with the following HTML:

<p>Plain URL: %url%</p>
<p>URL in a link with text: <a href="%url%">klik hier</a></p>
<p>URL in a link with the url as text: <a href="%url%">%url%</a></p>

In linked an export definition with a dataset of type activitycontentblocks and a single field called url with the following expression: this.activity.contact.organization().website.

Creating an activity using this template yields the following result:
image

Is your scenario different from what I tried to do?

1 Like

Hi Wim. Thanks for your help! The issue was caused by my lack of HTML knowledge. The problem was that i named the exportdefinition %Linkedin-URL%. I later found out that HTML hrefs’ require you to use lower dashes instead of hyphens.