Expand my Community achievements bar.

SOLVED

templates placed under /apps/<projectname>/projects/templates/* note visible

Avatar

Employee

Hi,

 

We have a custom solution in which we have a custom template for a project as well. We place it in /libs/<productname>/projects/templates/* from where it used in many places in the code as well.

 

But after this whenever we place any template in /apps/<projectname>/projects/templates/* it is not shown? what can be the reason for this? if we remove /libs/<productname>/projects/templates/* it is also not then? when we uninstall the package it becomes ok

 

Please can you let me know the cause?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @tasunil1,

 

We should be keeping all the custom code in /apps.

 

/libs is for the out of the box code, which can be overlaid/extended in /apps

 

If you are using static templates, you should create them in /apps/<project name>/projects/templates/* (as you have mentioned in your blog). The reason it is not visible while creating a page, could be you are missing allowed paths property on your template

 

Screenshot 2021-01-22 at 10.23.27.png

 

And if you are using editable templates, please refer to this blog, it has a very good explanation.

https://blog.3sharecorp.com/creating-editable-templates-adobe-experience-manager#:~:text=Usually%20y....

 

 

 

View solution in original post

6 Replies

Avatar

Correct answer by
Community Advisor

Hi @tasunil1,

 

We should be keeping all the custom code in /apps.

 

/libs is for the out of the box code, which can be overlaid/extended in /apps

 

If you are using static templates, you should create them in /apps/<project name>/projects/templates/* (as you have mentioned in your blog). The reason it is not visible while creating a page, could be you are missing allowed paths property on your template

 

Screenshot 2021-01-22 at 10.23.27.png

 

And if you are using editable templates, please refer to this blog, it has a very good explanation.

https://blog.3sharecorp.com/creating-editable-templates-adobe-experience-manager#:~:text=Usually%20y....

 

 

 

Avatar

Employee
Hello @ChitraMadan is there any way i debug which paths are being overlayed. because i added the allowed paths but still it is not visible. Is there any place i can see when loading the newprojects.html these will be loaded

Avatar

Community Advisor
@tasunil, So, you meant, when you are creating a new page, you are not able to see these templates?

Avatar

Employee
Hello @ChitraMadan, when i added my own projct in libs, projects/templates/default is not getting loaded , even if i copy any other template any other template it does not load if i place templates in libs/myproject/projects/template/default.

Avatar

Community Advisor

Please check if content node has allowedTemplates property or not, please check flow

chlimage_1-176_c4

 

 



Arun Patidar