Hi,
having large amount of activities on a daily basis a user easily gets lost in the content of activity feed e-mail notificiation.
What is the best way to group individual activities by related Site?
Outline of how notification e-mail structure should look like:
Site 1 (heading)
User1 updated Document 1 in Site 1.
User1 deleted Document 2 in Site 1.
----
Site 2 (heading)
User1 updated Document 3 in Site 2.
User2 added Document 4 in Site 2.
Thank you for any useful information in advance.
D.
Solved! Go to Solution.
The email template that is used to produce that notification resides in the Data Dictionary under Email Templates/activities.
In that template, you can see where the list of activities is iterated over:
<#list activities as activity>
In that loop you can see where the site ID gets referenced:
${activity.siteNetwork?html}
So, if you want to iterate over the sites in the activities collection instead of just all of the activities, you can edit the template to iterate over the activities to build a list of site IDs, then you can iterate over that list to produce the site-specific groups.
If you need help, refer to the Freemarker reference:
Jeff
The email template that is used to produce that notification resides in the Data Dictionary under Email Templates/activities.
In that template, you can see where the list of activities is iterated over:
<#list activities as activity>
In that loop you can see where the site ID gets referenced:
${activity.siteNetwork?html}
So, if you want to iterate over the sites in the activities collection instead of just all of the activities, you can edit the template to iterate over the activities to build a list of site IDs, then you can iterate over that list to produce the site-specific groups.
If you need help, refer to the Freemarker reference:
Jeff
Hi, Jeff.
Thank you. Yes, I am aware of the template file. I needed some kind of comfirmation that this is correct way to do it. Alternatively, I was wondering if there is a common way to override Activity Feed Notification logic that creates objects for the FTL to avoid juggling with data in the template file.
But It would probably take less effort to modify just the presentation layer.
Best regards,
D.
Oh yeah, I'd definitely just do this in the presentation layer. Much easier and I know it works.
If someone were still interested, below is the implementation of Jeff's description
<#assign siteNetworks = []> <#list activities as activity> <#if activity.siteNetwork??> <#if !siteNetworks?seq_contains(activity.siteNetwork)> <#assign siteNetworks = siteNetworks + [activity.siteNetwork]> </#if> </#if> </#list> <#list siteNetworks as siteNetwork> <div style="..."> ${(siteTitles[siteNetwork]?html)!siteNetwork?html} </div> <#list activities as activity> <#if siteNetwork == activity.siteNetwork> ... </#if> </#list> </#list>
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.