syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Syncope > Manage notification e-mail templates
Date Wed, 09 Jan 2013 12:21:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/3/_/styles/combined.css?spaceKey=SYNCOPE&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/SYNCOPE/Manage+notification+e-mail+templates">Manage
notification e-mail templates</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~ilgrosso">Francesco
Chicchiricco</a>
    </h4>
        <br/>
                         <h4>Changes (8)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>Besides standard expressions,
you can use the following Syncope-specific variables: <br></td></tr>
            <tr><td class="diff-changed-lines" >* <span class="diff-changed-words"><span
class="diff-added-chars"style="background-color: #dfd;">{{</span>user<span class="diff-added-chars"style="background-color:
#dfd;">}}</span></span> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
 [UserTO|http://syncope.apache.org/apidocs/org/apache/syncope/client/to/UserTO.html] instance
representing the subject of the current notification <br></td></tr>
            <tr><td class="diff-changed-lines" >* <span class="diff-changed-words"><span
class="diff-added-chars"style="background-color: #dfd;">{{</span>syncopeConf<span
class="diff-added-chars"style="background-color: #dfd;">}}</span></span> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
 {{Map&lt;String, String&gt;}} containing all defined configurations as {{&lt;key,
value&gt;}} <br></td></tr>
            <tr><td class="diff-changed-lines" >* <span class="diff-changed-words"><span
class="diff-added-chars"style="background-color: #dfd;">{{</span>recipients<span
class="diff-added-chars"style="background-color: #dfd;">}}</span></span> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
 list of [UserTO|http://syncope.apache.org/apidocs/org/apache/syncope/client/to/UserTO.html]
instances for all the actual recipients of the current notification e-mail <br></td></tr>
            <tr><td class="diff-changed-lines" >* <span class="diff-changed-words"><span
class="diff-added-chars"style="background-color: #dfd;">{{</span>events<span class="diff-added-chars"style="background-color:
#dfd;">}}</span></span> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
 list of {{String}} containing all the events that triggered the current notification <br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <style type='text/css'>/*<![CDATA[*/
div.rbtoc1357734003527 {margin-left: 1.5em;padding: 0px;}
div.rbtoc1357734003527 ul {list-style: decimal;margin-left: 0px;}
div.rbtoc1357734003527 li {margin-left: 0px;padding-left: 0px;}

/*]]>*/</style><div class='rbtoc1357734003527'>
<ul>
    <li><a href='#Managenotificatione-mailtemplates-Introduction'>Introduction</a></li>
    <li><a href='#Managenotificatione-mailtemplates-Templatefiles'>Template files</a></li>
    <li><a href='#Managenotificatione-mailtemplates-Templatelocation'>Template
location</a></li>
    <li><a href='#Managenotificatione-mailtemplates-Templateformat'>Template format</a></li>
</ul></div>

<h1><a name="Managenotificatione-mailtemplates-Introduction"></a>Introduction</h1>

<p>You can create new (and modify existing) template messages to customize the body
of notification messages. This can be achieved by creating and / or modifying the notification
e-mail template files.</p>

<h1><a name="Managenotificatione-mailtemplates-Templatefiles"></a>Template
files</h1>

<p>Templates are defined by their <em>name</em>. </p>

<p>Each template is made up of a couple of files:</p>
<ul>
	<li>the rich-text HTML variant (with extension <tt>.html.vm</tt>)</li>
	<li>the plain text variant (with extension <tt>.txt.vm</tt>)</li>
</ul>


<p>For example, the default <em>optin</em> template is defined by:</p>
<ul>
	<li><tt>optin.html.vm</tt></li>
	<li><tt>optin.txt.vm</tt></li>
</ul>


<h1><a name="Managenotificatione-mailtemplates-Templatelocation"></a>Template
location</h1>

<p>Assuming you have generated and built your own project, existing templates (including
the default <em>optin</em> template) are located under </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">core/target/syncope/WEB-INF/classes/mailTemplates/</pre>
</div></div>

<p>You need to create your own template files (or copy existing to modify) under </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">core/src/main/resources/mailTemplates/</pre>
</div></div>

<h1><a name="Managenotificatione-mailtemplates-Templateformat"></a>Template
format</h1>

<p>Template files are interpreted using the <a href="http://velocity.apache.org"
class="external-link" rel="nofollow">Velocity engine</a>; check the <a href="http://velocity.apache.org/engine/devel/vtl-reference-guide.html"
class="external-link" rel="nofollow">language reference</a>.</p>

<p>Besides standard expressions, you can use the following Syncope-specific variables:</p>
<ul>
	<li><tt>user</tt><br/>
  <a href="http://syncope.apache.org/apidocs/org/apache/syncope/client/to/UserTO.html"
class="external-link" rel="nofollow">UserTO</a> instance representing the subject
of the current notification</li>
	<li><tt>syncopeConf</tt><br/>
  <tt>Map&lt;String, String&gt;</tt> containing all defined configurations
as <tt>&lt;key, value&gt;</tt></li>
	<li><tt>recipients</tt><br/>
  list of <a href="http://syncope.apache.org/apidocs/org/apache/syncope/client/to/UserTO.html"
class="external-link" rel="nofollow">UserTO</a> instances for all the actual recipients
of the current notification e-mail</li>
	<li><tt>events</tt><br/>
  list of <tt>String</tt> containing all the events that triggered the current
notification</li>
</ul>

    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/SYNCOPE/Manage+notification+e-mail+templates">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=30747253&revisedVersion=4&originalVersion=3">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/SYNCOPE/Manage+notification+e-mail+templates?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message