Highlighted

How to customize email template - Social Community

ashagopal

05-11-2018

Hi @Rahul_Bhardwaj

I am working on Adobe Social Communities 6.4 and I need to customize email template under /libs to add additional fields such as post title and group title when user posts a reply.

I have done server side customization on Post component to get the post and group title.

I have updated the e-mail template in to display additional properties {{{object.component.groupTitle}}} and {{{object.component.postTitle}}}

These values are not appearing in the email triggered on replying to a post. I see that my custom side code is executed as verified from logs.

The value of {{{object.component}}} does not seem to be available in the template.

Please let me know if I am missing anything.

Note: In 6.2, the templates email templates were under /etc and were properly displaying the group and post title.

After migrating to 6.4, the templates are not available under /etc folder but only under /libs.

I tried copying email templates to /etc, but these templates were not picked only those under /libs were considered. Hence I tried to change the template directly under /libs to encounter the issue as mentioned above. The custom groupTitle and postTitle are not displayed.

Thanks,

Asha Gopal

Replies

Highlighted

Rahul_Bhardwaj

Employee

05-11-2018

Hi Asha,

First things first - you should never change anything under /libs directly. Always create overlays under /apps for corresponding paths.

Editing templates under /libs is bad practice.

Secondly, there is a design change from 6.2 to 6.4 that the templates will have a new home under /libs. Copying them to /etc should not and in all probability wouldn't have any consequence.

Now, coming to your real problem. It's a bit difficult to tell what's going wrong here by just looking at the details that you shared but still can you try with this.object.component instead of just object component? I am skeptical that this fix it for you but just try it once.

If this doesn't work, please file a daycare ticket along with your custom code and templates.

Regards,

Rahul

Highlighted

ashagopal

06-11-2018

Hi Rahul,

We did not intend to modify /libs template. Since the overlay at /apps and also at /etc, did not work, we tried to see if /libs works or not.

As per your suggestion, I changed object.component to this.object.component, but did not get the results. I even print the this object in the template, it did not have component field under object.

We have raised a day care for the same - Adobe CQ Ticket : 163712

Please let us know if there is any other way to resolve this issue.

Thanks,

Asha Gopal

Highlighted

Rahul_Bhardwaj

Employee

06-11-2018

Hi Asha,

Yes, I know about 163712 and actually it is working for me. Anyways, that ticket under discussion.

About unavailability of object.common, looks like, I will have to see you code, to figure out, what might be happening here.

By the way, while filing daycare for this one, please make sure to include relevant server logs along with the code.

Regards,

Rahul

Highlighted

ashagopal

06-11-2018

Hi Rahul,

I have updated the ticket 163712 with the information on custom email template, logs and code.

Please help to resolve the issue.

Thanks,

Asha Gopal