CKB:Removing the Application Logo from email templates
Applies to:
Purpose:
This article shows an example for one of the possibilites for modifying Cryptshare E-Mail Templates as described in the Cryptshare Server Manual. In this case, the email template is changed so that the Cryptshare logo is removed from the email notifications.
* the table-layout: removing single cells can break the layout, removing complete rows is possible
* the velocity code: Templates are not pure HTML but also contain application logic (i.e. placeholders starting with a '$'-character). This code should be kept intact.
Step-by-step guide:
Download the language package you want to change. Assuming you want to change the server templates, the language packages can be found here.
Unpack the zip file and navigate to the subdirectory 'templates'.
Open the file 'head.html' with a text file editor supporting UTF-8 encoding, for instance notepad++ or PSPad
Remove the if-else block regarding '$applicationLogo' (Lines 1-7)
Show original template file
Original File #if(!$applicationLogo) #if($baseurl.endsWith('/')) #set($applicationLogo = $baseurl + "images/application_logo.png") #else #set($applicationLogo = $baseurl + "/images/application_logo.png") #end #end
<img alt="CRYPTSHARE LOGO" src="$applicationLogo" width="200" />
$slogan
<nobr>$heading</nobr>
<a href="$baseurl" class="InfoText">
$baseurl
</a>
Show file without if-else block Changed File
<img alt="CRYPTSHARE LOGO" src="$applicationLogo" width="200" />
$slogan
<nobr>$heading</nobr>
<a href="$baseurl" class="InfoText">
$baseurl
</a>
Replace the complete img-tag with ' ' (Line 10 in unchanged file)
Show original template file
Original File #if(!$applicationLogo) #if($baseurl.endsWith('/')) #set($applicationLogo = $baseurl + "images/application_logo.png") #else #set($applicationLogo = $baseurl + "/images/application_logo.png") #end #end
<img alt="CRYPTSHARE LOGO" src="$applicationLogo" width="200" />
$slogan
<nobr>$heading</nobr>
<a href="$baseurl" class="InfoText">
$baseurl
</a>
Show changed file Changed File
$slogan
<nobr>$heading</nobr>
<a href="$baseurl" class="InfoText">
$baseurl
</a>
- Repeat step 3 to 5 for each 'head.html' file in the subfolders of the directory 'templates'.
(For the default package this is only required for 'templates/recipient')
Save the changes and exit the editor.
Pack the edited language package into a zip file. Make sure to retain the original structure as shown in the documentation.
Install the language package on your server via the Administration Interface.