AnsweredAssumed Answered

Mail templates

Question asked by jjhinojosa on Nov 30, 2007
Latest reply on Nov 30, 2007 by jjhinojosa
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Ã

Outcomes