Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Applies to:

Note
All versions of Cryptshare Server

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.

Info

Please note, that you can make any changes in the e-mail templates if you are familiar with HTML. The only thing you need to keep intact is

  • 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:



  1. Section


    Column
    width48%

    Download the language package you want to change. Assuming you want to change the server templates, the language packages can be found here.


    Column
    width48%




  2. Section


    Column
    width48%

    Unpack the zip file and navigate to the subdirectory 'templates'.


    Column
    width48%




  3. Section


    Column
    width48%

     Open the file 'head.html' with a text file editor supporting UTF-8 encoding, for instance notepad++ or PSPad


    Column
    width48%





  4. Section


    Column
    width48%

     Remove the if-else block regarding '$applicationLogo' (Lines 1-7)


    Column
    width48%


    Expand
    titleShow original template file


    Code Block
    languagejava
    titleOriginal File
    linenumberstrue
    #if(!$applicationLogo)
        #if($baseurl.endsWith('/'))
            #set($applicationLogo = $baseurl  + "images/application_logo.png")
        #else
            #set($applicationLogo = $baseurl  + "/images/application_logo.png")
        #end
    #end
    <tr id="Header">
        <td width="$width_2">
            <img alt="CRYPTSHARE LOGO" src="$applicationLogo" width="200" />
        </td>
        <td id="Slogan">
            $slogan
        </td>
    </tr>
    <tr>
        <td width="$width_2" colspan="2" class="PrimaryColorBox" >
            <h2><nobr>$heading</nobr></h2>
        </td>
    </tr>
    <tr>
        <td  width="$width_2" colspan="2" class="PrimaryColorBox">    
            <a href="$baseurl" class="InfoText">
            <h3>$baseurl</h3>
        </a>
        </td>
    </tr>



    Expand
    titleShow file without if-else block


    Code Block
    languagejava
    titleChanged File
    linenumberstrue
    <tr id="Header">
        <td width="$width_2">
            <img alt="CRYPTSHARE LOGO" src="$applicationLogo" width="200" />
        </td>
        <td id="Slogan">
            $slogan
        </td>
    </tr>
    <tr>
        <td width="$width_2" colspan="2" class="PrimaryColorBox" >
            <h2><nobr>$heading</nobr></h2>
        </td>
    </tr>
    <tr>
        <td  width="$width_2" colspan="2" class="PrimaryColorBox">    
            <a href="$baseurl" class="InfoText">
            <h3>$baseurl</h3>
        </a>
        </td>
    </tr>






  5. Section


    Column
    width48%

     Replace the complete img-tag with '&nbsp;' (Line 10 in unchanged file)

    Note

    It is important to keep the td-tag, otherwise the table-layout is corrupt and contents will be misplaced.



    Column
    width48%


    Expand
    titleShow original template file


    Code Block
    languagejava
    titleOriginal File
    linenumberstrue
    #if(!$applicationLogo)
        #if($baseurl.endsWith('/'))
            #set($applicationLogo = $baseurl  + "images/application_logo.png")
        #else
            #set($applicationLogo = $baseurl  + "/images/application_logo.png")
        #end
    #end
    <tr id="Header">
        <td width="$width_2">
            <img alt="CRYPTSHARE LOGO" src="$applicationLogo" width="200" />
        </td>
        <td id="Slogan">
            $slogan
        </td>
    </tr>
    <tr>
        <td width="$width_2" colspan="2" class="PrimaryColorBox" >
            <h2><nobr>$heading</nobr></h2>
        </td>
    </tr>
    <tr>
        <td  width="$width_2" colspan="2" class="PrimaryColorBox">    
            <a href="$baseurl" class="InfoText">
            <h3>$baseurl</h3>
        </a>
        </td>
    </tr>



    Expand
    titleShow changed file


    Code Block
    languagejava
    titleChanged File
    linenumberstrue
    <tr id="Header">
        <td width="$width_2">
            &nbsp;
        </td>
        <td id="Slogan">
            $slogan
        </td>
    </tr>
    <tr>
        <td width="$width_2" colspan="2" class="PrimaryColorBox" >
            <h2><nobr>$heading</nobr></h2>
        </td>
    </tr>
    <tr>
        <td  width="$width_2" colspan="2" class="PrimaryColorBox">    
            <a href="$baseurl" class="InfoText">
            <h3>$baseurl</h3>
        </a>
        </td>
    </tr>





  6. 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')

  7. Section


    Column
    width48%

     Save the changes and exit the editor.




  8. Section


    Column
    width48%

     Pack the edited language package into a zip file. Make sure to retain the original structure as shown in the documentation.

    Info

    Please note that language packages having the wrong directory/file-structure will not be recognized as a valid package and declined when trying to install them.



    Column
    width48%

     




  9. Section


    Column
    width48%

     Install the language package on your server via the Administration Interface.

Content by Label
showLabelsfalse
max5
spacesCKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("e-mail","logo","template") and type = "page" and space = "CKB"
labelslogo e-mail template

Page properties
hiddentrue
Related issues