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 create page component in AEM 6.5

Avatar

Level 7

How to create custom page component for AEM page.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @akshaybhujbale 

  • Create a new component in your project inherited from the core page component. 

 

sling:resourceSuperType="core/wcm/components/page/v3/page"​

 

Customize your page properties if needed same as the other components.

 

  • Now create a template type which resource type will be your page

 

Initial Section
    - sling:resourceType="my-project/components/page"
Policies
    - Same as other
Structure
    - sling:resourceType="my-project/components/page"​

 

 

  • Then create a template from the newly created template type

 

In Template Config:
    - cq:templateType="/conf/my-project/settings/wcm/template-types/base-page"
    - allowedPaths="[/content/my-project(.*)?]"

Initial:
    - cq:template="/conf/my-project/settings/wcm/templates/content-page"
    - sling:resourceType="my-project/components/page"
Policies:
    - No extra changes
Structure:
    - cq:template="/conf/my-project/settings/wcm/templates/content-page"
    - sling:resourceType="my-project/components/page"

 

 

You can also see this blog where the process is shown step by step: http://www.sgaemsolutions.com/2019/02/how-to-make-page-component-and-template.html 

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hello @akshaybhujbale 

  • Create a new component in your project inherited from the core page component. 

 

sling:resourceSuperType="core/wcm/components/page/v3/page"​

 

Customize your page properties if needed same as the other components.

 

  • Now create a template type which resource type will be your page

 

Initial Section
    - sling:resourceType="my-project/components/page"
Policies
    - Same as other
Structure
    - sling:resourceType="my-project/components/page"​

 

 

  • Then create a template from the newly created template type

 

In Template Config:
    - cq:templateType="/conf/my-project/settings/wcm/template-types/base-page"
    - allowedPaths="[/content/my-project(.*)?]"

Initial:
    - cq:template="/conf/my-project/settings/wcm/templates/content-page"
    - sling:resourceType="my-project/components/page"
Policies:
    - No extra changes
Structure:
    - cq:template="/conf/my-project/settings/wcm/templates/content-page"
    - sling:resourceType="my-project/components/page"

 

 

You can also see this blog where the process is shown step by step: http://www.sgaemsolutions.com/2019/02/how-to-make-page-component-and-template.html 

Avatar

Community Advisor

Hi @akshaybhujbale 

 

  If you new to AEM development , please refer and try https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-wknd-tutorial-devel... . This is a good starting point to learn AEM development. 

 

There are a lot of videos that will help you with this . Please find below some 

https://www.youtube.com/watch?v=G_9m9Qo45RE


Thanks

Veena ✌