Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Editable Templates with existing static template is not working

venugarg6
Level 1
Level 1

Hello All,

Hope everyone is doing same.

I'm working on first time on editable templates and trying to set up them from scratch, The issue I'm facing is when I'm pointing my resource type in initial section of template to out of the box path, it is working fine, but when I'm pointing to custom v2 (page path) it's breaking.

OOTB Path : wcm/foundation/components/page

Custom Path : core/wcm/components/page/v2/page

 

Could some one please help here.

 

1 Accepted Solution
Vijayalakshmi_S
Correct answer by
Community Advisor
Community Advisor

Hi @venugarg6,

For creating editable template out of custom page component, we need to

  • Create proxy page component out of Core V2 Page component. (New component in your project specific folder that inherits from Core V2 page component via sling:resourceSuperType)
  • Create Editable template-type which is a template for Editable template. This definition should have initial/jcr:content point to new component as created in previous step. 
  • From Tools -> General -> Templates -> Create Template -> Editable template-type created in previous step would be available for you to create template out of it. 

Custom page component -> Editable template-type -> Editable Template -> Page

Since you are working for the first time in Editable Template, I suggest to refer the we-retail template structure and create similar to it. (Copy paste the template-type definition to project specific folder and update page component in initial and structure nodes)

Consider an example of We-retail Content page template available at /conf/we-retail/settings/wcm/templates/content-page

  • Editable template-type is/conf/we-retail/settings/wcm/template-types/empty-page
  • Page component : weretail/components/structure/page (This inherits from core/wcm/components/page/v2/page)

If you still face issues, please do update this thread with error details. 

View solution in original post

6 Replies
KiranVedantam1992
Community Advisor
Community Advisor

Hi @venugarg6

 

Can you please share more info? How are you pointing the page from the core component? did you create its proxy in your custom project?

 

What error are you getting in the error.log once you load the page?

 

Thanks,

Kiran Vedantam.

Vijayalakshmi_S
Correct answer by
Community Advisor
Community Advisor

Hi @venugarg6,

For creating editable template out of custom page component, we need to

  • Create proxy page component out of Core V2 Page component. (New component in your project specific folder that inherits from Core V2 page component via sling:resourceSuperType)
  • Create Editable template-type which is a template for Editable template. This definition should have initial/jcr:content point to new component as created in previous step. 
  • From Tools -> General -> Templates -> Create Template -> Editable template-type created in previous step would be available for you to create template out of it. 

Custom page component -> Editable template-type -> Editable Template -> Page

Since you are working for the first time in Editable Template, I suggest to refer the we-retail template structure and create similar to it. (Copy paste the template-type definition to project specific folder and update page component in initial and structure nodes)

Consider an example of We-retail Content page template available at /conf/we-retail/settings/wcm/templates/content-page

  • Editable template-type is/conf/we-retail/settings/wcm/template-types/empty-page
  • Page component : weretail/components/structure/page (This inherits from core/wcm/components/page/v2/page)

If you still face issues, please do update this thread with error details. 

View solution in original post

Roger_Ra
Level 1
Level 1
Hi V,Have done the same steps, any idea why I do not see the components to select from in component list (left had Nav) http://localhost:4502/editor.html/conf/we-retail/settings/wcm/templates/pav3/structure.html
venugarg6
Level 1
Level 1
Hello @Roger_Ra I followed the same steps it worked for me. Have you choosed the component group already?
asutosh_jena
Community Advisor
Community Advisor

HI @venugarg6 

 

Please see the detailed explanation of how to create the dynamic template in AEM.

http://www.sgaemsolutions.com/2017/09/dynamic-editable-templates-in-aem-63.html

 

Thanks!