Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

How to customize or create function blueprint in AEM communities

Avatar

Level 3

In AEM 6.2 communities , by default some blueprints to create a function is already available like blog (/content/communities/templates/functions/blog) , calendar , page etc .

Using these blueprints we can create a function using this URL http://{server}:{port}/communities/communityfunctions .

In Case i want to override a blueprint or want to create a new blueprint what would be an ideal approach ?

1. I can override the template in /apps . for example : blog components refers to "/libs/social/console/templates/base_page" we can create a similar structure in "/apps/social/console/templates/base_page" . but disadvantages of this approach is if there are multiple websites on my AEM server then it will get override for each website .

To overcome from this problem another solution is.

2. Create a custom function blueprint on this path /content/communities/templates/functions path and create a function using this custom blueprint.

Now my queries are : Is there any OOTB interface provided by AEM to create a blueprint under  /content/communities/templates/functions or we have to deploy the blueprint as a part of code ?

secondly if i create a custom function using /communities/communityfunctions on this path /etc/community/templates/functions/custom/custom_blog_function . function get created but configuration folder is not getting created just like ootb functions "/etc/community/templates/functions/reference/blog/configuration" . How can i achieve this .

Please guide.

Thanks

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi karansheel​,

Sorry for the delayed response but the notification to this question somehow got missed. This looks like a use case of editable site templates, the support of which will be introduced in next release, i.e. AEM 6.5. Till that, the approach you have taken seems to be the only way to achieve what you need but please bear in mind, this is not a robust and recommended approach. Any future servicepack, cumulativefixpack may break this.

My recommendation would be to wait till this actually gets supported OOTB, unless absolutely necessary.

View solution in original post

5 Replies

Avatar

Level 3

Hi Rahul,

Thanks for the reply.

Actually i'm not looking for the extension . My only aim is to include my site header footer when we create a community site. As every function (Blog,Page etc) in community site is created using a blueprint which is pointing to a page. For example :- blog function is pointing to "/libs/social/console/components/basepage" . Now to achieve i'm creating a blueprint "/content/communities/templates/functions/my-blog" and then creating a function using this. adding this function to a site-template and then creating site using this template.

Is this approach correct ?

Avatar

Correct answer by
Employee

Hi karansheel​,

Sorry for the delayed response but the notification to this question somehow got missed. This looks like a use case of editable site templates, the support of which will be introduced in next release, i.e. AEM 6.5. Till that, the approach you have taken seems to be the only way to achieve what you need but please bear in mind, this is not a robust and recommended approach. Any future servicepack, cumulativefixpack may break this.

My recommendation would be to wait till this actually gets supported OOTB, unless absolutely necessary.

Avatar

Level 3

Hi Rahul_Bhardwaj​,

Thanks for reply.

i asked one more question . Here is link.

Reason whenever we face an error in error logs it doesn't point exact line of handlebars script .

Can you please provide some light on it.

Thanks,

Karansheel