How to prepare placeholders-based hyperlinks
This article is obsolete and may relate only to older versions of our software.
Problem:
How to create hyperlinks with partially dynamic content, like first and last name or special ID assigned to every user.
Solution:
If you are using CodeTwo Exchange Rules PRO 2.x version, please refer to this article. The process of creating such hyperlinks has been simplified, you may check how to upgrade here.
Use Rotating Texts to prepare correct hyperlinks. We are about to create three parts of HTML (and ocassionally CSS) code and then merge them into one together with dynamic content:
<a href="http://example.com/{AD FIELD}.vcf">Download {AD FIELD}'s VCard</a>
In our example scenario, every employee has their own vCard, stored on http://example.com/download/{Last Name}.vcf, for example http://example.com/download/Percival.vcf.
Create neccessary folders and files structure
Create a new folder on your hard drive and navigate into it to create subfolders as in the below example:
- Part1, so full path would be: C:\C2Links\Part1
- Part2, so full path would be: C:\C2Links\Part2
- Part3, so full path would be: C:\C2Links\Part3
Prepare first part of the link
Create a HTML file inside C:\C2Links\Part1 with any name, e.g. file.htm. Open it in any HTML editor or even Windows Notepad and then write code similar to the one shown below:
<a href="http://example.com/download/
The dynamic content will be inserted directly after the last character. Please note, that you may also add CSS and HTML attributes or different target, as presented below:
<a style="color: #000" href="http://example.com/vcards/
Prepare second and third part of the link
Create another HTML file in C:\C2Links\Part2, e.g. file.htm. We are about to create an element succeding after dynamic content, as below:
<a href="http://example.com/download/{Last Name}.vcf">
Where:
- Dark green color text stands for part 1, from file C:\C2Links\Part1\file.htm
- Orange color text stands for placeholder {Last Name}, pulled from Active Directory, as well as simple text
- Red color text stands for part we are about to create now
Save code showen below into the C:\C2Links\Part2\file.htm:
">
Then, create another file in C:\C2Links\Part2\Part3, then fill it with:
</a>
Edit signature template in CodeTwo Editor
Open CodeTwo software then open editor on signature/disclaimer you want to prepare. When editor comes up, please follow steps described below:
- Click on Dynamic Field, select Dynamic Content and then choose Rotating Text.
- Insert placeholders and text that shuld inside the target link (we are trying to add orange element in Prepare second and third part of the link section). In our case it will be {Last Name}.vcf.
- Click on Dynamic Field, select Dynamic Content and then choose Rotating Text.
- click on it
- from Properties window located on the right side select Folder path and point it to the C:\C2Links\Part2\file.htm
- Insert placeholders and text that should be visible in message. In our case it will be Download {Last Name}'s vCard
- Click on Dynamic Field, select Dynamic Content and then choose Rotating Text.
- click on it
- from Properties window located on the right side select Folder path and point it to the C:\C2Links\Part3\file.htm
- End result will be similar to this:
Please do not forget to save changes in editor using Save & Close button and then to submit changes onto server.
See also:
Related products: | CodeTwo Email Signatures for Email Clients, CodeTwo Exchange Rules 2007 1.x, 2.x, 3.x, CodeTwo Exchange Rules 2010 1.x, 2.x, CodeTwo Exchange Rules 2013 1.x, CodeTwo Exchange Rules Pro 1.x |
Categories: | How-To |
Last modified: | February 12, 2021 |
Created: | October 15, 2014 |
ID: | 434 |