Question
Property in href of correspondance?
Hi.
I'm trying to create a correspondance that could let my user click on a link with a href contained in a property. Sadly, when the mail is sent, the href disappears and the text returns to a normal text instead of a link.
I tried the following:
- <a href="name={.Property}">SomeText</a>
- <a href="<pega:reference name=".Property"></pega:reference>">SomeText</a>
But it's sadly not working. How can I achieve that? Thanks in advance.
***Updated by moderator: Lochan to add Categories***
Hi Thomas,
What does the link contain? Are you trying to access anything inside Pega through that link? Or it is just a link to a website? If it is just a website, you can use the following,
<a href="http://google.com">Hi</a>
If a property value is being displayed as a hyperlink, then try the following:
<a href="http://Google.com"><pega:reference name=".pyNote"></pega:reference></a>
As in your case, where you have the value of the property as the URL, you need to send the value dynamically. This can be achieved with the help of scripts.
<html>
<script language="javascript" type="text/javascript">
var scrt_var = "<pega:reference name=".pyNote" mode="javascript" / >";
openPage = function() {
location.href = scrt_var;
}
</script>
this is a <a href="javascript:openPage()">Link </a>
</html>
Here, the value of the property "pyNote" will be sent dynamically to the href tag inside html. You can paste this code in the "source" section of the correspondance and alter the property referred.
Thanks,
Ratan