CodeTwo Base.title

How to prepare placeholders-based hyperlinks

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 should like: C:\C2Links\Part1
  • Part2, so full path should like: C:\C2Links\Part2
  • Part3, so full path should like: 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:

  1. 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\Part1\file.htm
      434-3
      Fig. 1.
      Properties window in CodeTwo Editor.
  2. 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.
  3. 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
  4. Insert placeholders and text that should be visible in message. In our case it will be Download {Last Name}'s vCard
  5. 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
  6. End result will be similar to this:

434-2
Fig. 2. End result.

Please do not forget to save changes in editor using Save & Close button and then to submit changes onto server.

See also:

Our Clients:
Unicef
Facebook
Shell
T-Systems
Loreal
Casio
UPS Israel
Oford University
Mitsubishi Motors
Toshiba TEC UK Imaging Systems Ltd
Illinois Institute of Technology
MAN Diesel
McDonalds India
Skoda Auto
Bank of Israel
Fujifilm
China Mobile
Santander
Samsung SDI
Skanska
Generali
Telmex
Toyota Tsusho
BECHTEL
Ricoh
BAE SYSTEMS
Federação Portuguesa de Futebol
Credit Agricole
HYUNDAI
Rothschild
Toyota Boshoku
Oriflame Romania
ING
Ikea
Nordea

Partners, certificates & awards