cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in ftl file content

sowmya
Champ in-the-making
Champ in-the-making
Hi…
To get email notifications for every forum update in share we will use alfresco explore to set the rules.
I created rules and got email notifications correctly.

While creating rules, it will ask us to choose a template for email notification (notify_user_email.ftl)…
This ftl file will have some default notification message.. Suppose, if I need to change this notification message content, what should I do?

I found this ftl file in, C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\templates\email\notify_user_email.ftl.
I had changed its content and having my new content in that file(also changed inside the war) and restarted my tomcat….

But even then, I am getting only the old notification message.. But not the new one… why it is so?  Where should I need to have this new notification email message  content(it must have dynamic values)???

Thanks in advance…
11 REPLIES 11

jottley
Confirmed Champ
Confirmed Champ
Instead of going through some pseudo code….I tested it 🙂

This works:

${document.parent.childAssocs["cm:contains"][0].properties.title}

Jared

jottley
Confirmed Champ
Confirmed Champ
One thing to note that the above will work for existing discussion topics but not for new topics.

To work with new topics use:

<#if document.typeShort == "fm:topic">'${document.childAssocs["cm:contains"][0].properties.title}<#else>'${document.parent.childAssocs["cm:contains"][0].properties.title}'</#if>

The one issue that I see with this is that it will send two emails: one for the creation of the topic and one for the first post.

If this is not ok, then you will need to filter the rule to only execute on fmSmiley Tongueost content.

So add fmSmiley Tongueost as a subtype to the Action Wizards config of your web-client-config-custom.xml

   <config evaluator="string-compare" condition="Action Wizards">
      <subtypes>
         <type name="fmSmiley Tongueost"/>
      </subtypes>
   </config>

And then set as the condition of your rule that it should run when the type is Forum Article

Jared