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

humbertoccs
Champ in-the-making
Champ in-the-making
Well… the first thing i would try to do is delete the file, if Alfresco still send the message, the you need to search your folder, and try to find some lost file that is been used by Alfresco.

mrogers
Star Contributor
Star Contributor
You can also have email templates in the data dictionary.    So they won't be on the filesystem and they can be updated on-line.

sowmya
Champ in-the-making
Champ in-the-making
Thanks a lot for your reply….
As you said I had updated in data dictionary…. I am getting my new updated mails…

What should I do to get the Discussion topic title name in mails. Currently I am using '${space.name}' in ftl to get the space details. So I am getting like "post-1281768539866_368" –> space name.

Suppose If I am having a discussion with name "alfresco rocks", I should get that discussion title name in mail. what should I do for that in ftl file? If possible reply the same for uploaded document title and blogspot topic titles.
Thanks for your fast responses…

jottley
Confirmed Champ
Confirmed Champ
It is not really a space….but that is neither here nor there.  You an get the discussion name by accessing the parent node of the post.

Using your example ${space.parent.name}

Jared

sowmya
Champ in-the-making
Champ in-the-making
Thanks for your reply…
As you said, when I am using ${space.parent.name} in the ftl, I am getting the site name {in mail} after creating a new discussion post…
And when replying for that discussion post, I am getting "discussion" (that is only the space name)in mail….
What should I do to get the title of the discussion post??

jottley
Confirmed Champ
Confirmed Champ
So your after the title…not the name of the first child in the associations of the fm:topic

space.parent.childAssocs["cm:contains"][0].title

I believe that should do the trick for you

Jared

sowmya
Champ in-the-making
Champ in-the-making
Do you mean like using ${space.parent.childAssocs["cm:contains"][0].title} in the ftl file.

jottley
Confirmed Champ
Confirmed Champ
Exactly

sowmya
Champ in-the-making
Champ in-the-making
Hi…
If I am using above expression in the ftl file, I cant able to save a discussion…. Shows error in cm:contains
Errors in tomcat console are:
Expression space.parent.childAssocs["cm:contains"][0].title is undefined on line 1, column 14 in workspace://SpacesStore/5044f0a9-c323-4 … c07e102694.
The problematic instruction:
———-
==> ${space.parent.childAssocs["cm:contains"][0].title} [on line 1, column 12 in workspace://SpacesStore/5044f0a9-c323-4 … c07e102694]
———-