cancel
Showing results for 
Search instead for 
Did you mean: 

Mail templates

jjhinojosa
Champ in-the-making
Champ in-the-making
Hi, I´m trying to do a mail template like this:

El Asunto XXXXXX ha sido introducido en el espacio de Reparto de Asuntos por la Consejería de XXXXXXXX.

In the red words must be properties of a document, but I don´t know how to insert this properties. Searching I have found a example:

<#– Get a list of all the property names for the document –>
<#assign props = document.properties?keys>
<#list props as t>
    <#– If the property exists –>
    <#if document.properties[t]?exists>
       <#– If it is a date, format it accordingly–>
       <#if document.properties[t]?is_date>
       <tr><td>${t} = ${document.properties[t]?date}</td></tr>
      
       <#– If it is a boolean, format it accordingly–>
       <#elseif document.properties[t]?is_boolean>
       <tr><td>${t} = ${document.properties[t]?string("yes", "no")}</td></tr>
      
       <#– Otherwise treat it as a string –>
       <#else>
       <tr><td>${t} = ${document.properties[t]}</td></tr>
       </#if>
    </#if>
</#list>


And the result of the mail like this:

       <tr><td>{http://www.alfresco.org/model/system/1.0}store-protocol = workspace</td></tr>
       <tr><td>{http://www.alfresco.org/model/content/1.0}content = org.alfresco.repo.template.BaseContentNode$TemplateContentData@1faef0a</td></tr>
       <tr><td>{http://www.alfresco.org/model/content/1.0}created = 30-nov-2007</td></tr>
      
       <tr><td>{Asuntos.model}resconsgob = </td></tr>
       <tr><td>{http://www.alfresco.org/model/content/1.0}versionLabel = 1.0</td></tr>
       <tr><td>{http://www.alfresco.org/model/content/1.0}autoVersion = yes</td></tr>
      
       <tr><td>{Asuntos.model}tema = </td></tr>
       <tr><td>{http://www.alfresco.org/model/application/1.0}editInline = yes</td></tr>
      
       <tr><td>{Asuntos.model}claseasunto = PROPUESTAS DE ACTOS ADMINISTRATIVOS</td></tr>
       <tr><td>{Asuntos.model}asunto = Nuevo Asunto</td></tr>
       <tr><td>{http://www.alfresco.org/model/system/1.0}store-identifier = SpacesStore</td></tr>
       <tr><td>{Asuntos.model}fechacomisionsg = 30-dic-2007</td></tr>
      
       <tr><td>{http://www.alfresco.org/model/content/1.0}initialVersion = yes</td></tr>
      
       <tr><td>{Asuntos.model}subclaseasunto = PROPUESTAS DE DECRETO</td></tr>
       <tr><td>{Asuntos.model}consejeria = CONSEJERÃ
1 REPLY 1

jjhinojosa
Champ in-the-making
Champ in-the-making
Sorry guys, it´s very easy.

El Asunto "${document.properties["as:asunto"]}" ha sido introducido en el espacio de Reparto de Asuntos por la Consejería de "${document.properties["as:consejeria"]}".