Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

How to Overlay a file in etc directory other than clientlibs

Avatar

Level 2

Hi, We want to change the email subscription default message in social communities. Can someone help me to overlay any files other than clientlibs like "/etc/community/templates/subscriptions-email/html/social.forum.components.hbs.topic/en". This file I wanted to save in our apps directory. Is it possible?

Thanks

Manoj Singh

1 Accepted Solution

Avatar

Correct answer by
Administrator

We can not overlay clientlibs (Create a sperate category library & include same in your template. ).

+1 with Veena_07

Also read Re: Overlaying clientlibs in AEM 6.2 is successfully overlaying BUT ALSO implementing seperately, es...

~kautuk



Kautuk Sahni

View solution in original post

3 Replies

Avatar

Level 10

You can change the value of the file at source.

Avatar

Community Advisor

Hi Manoj

     As scott mentioned, you can change the file at the source only. I would like to explain the reason here.

     Before you read on , One main point , You should not keep any email templates under apps, since anonymous users will not have any read permission for content under apps in publish.

     I have tried to explain below on why you should change file path in the source itself .

     You should read overlay together with sling resolution. The documentation Overlays - docs.adobe.com  will clearly tell you

       On a totally different context I have tried to explain one part of Sling resolution in here Template component can't override page.html , as it goes, any resource referred using a relative path will alone be considered for sling resolution and overlay. That means, if you have included a resource as <cq:include path="<name>" resourceType="community/templates/subscriptions-email/html/social.forum.components.hbs.topic/en"> , then overlay will come into picture and it will look for this resource under /apps first and then /libs

     But in your scenario, you are referring to an email template , which will always be referred using an absolute path (full path), so we cannot overlay the email template (as far as my knowledge serves me right ) and the only solution is to change the path in the source code.

Hope this helps

Thanks

Veena

Avatar

Correct answer by
Administrator

We can not overlay clientlibs (Create a sperate category library & include same in your template. ).

+1 with Veena_07

Also read Re: Overlaying clientlibs in AEM 6.2 is successfully overlaying BUT ALSO implementing seperately, es...

~kautuk



Kautuk Sahni