Components policy Inheritance in Editable templates | Community
Skip to main content
Level 2
April 23, 2024
Solved

Components policy Inheritance in Editable templates

  • April 23, 2024
  • 2 replies
  • 673 views

Hi,

 

I have component A with policies added in the Editable template in one project. And I want to create a proxy component "component B" of component A in another project. How can I inherit the component A policies into component B? Please help.

 

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aanchal-sikka

@mvelicheti 

 

Ideally, we should not proxy components across multiple projects. Rather create generic standardized components and then proxy them in respective projects.

This also assures that each project can have their own enhancements, if needed.

 

Regarding the query: As far as I know, Its not possible to inherit policies from parent component.

2 replies

aanchal-sikka
Community Advisor
aanchal-sikkaCommunity AdvisorAccepted solution
Community Advisor
April 24, 2024

@mvelicheti 

 

Ideally, we should not proxy components across multiple projects. Rather create generic standardized components and then proxy them in respective projects.

This also assures that each project can have their own enhancements, if needed.

 

Regarding the query: As far as I know, Its not possible to inherit policies from parent component.

Aanchal Sikka
HrishikeshKagne
Community Advisor
Community Advisor
May 5, 2024

Hi @mvelicheti ,

In Adobe Experience Manager (AEM), policies defined at the template level are inherited by components based on that template. However, if you want to reuse policies from one project's editable template for a proxy component in another project, you can follow these steps:

  1. Export Component A's Template:

    • In the first project, export the editable template containing component A and its associated policies. You can do this by navigating to the template in AEM and using the Package Manager to create a package containing the template.
  2. Import Template into Second Project:

    • In the second project, import the package containing the editable template from the first project. This will bring in the template along with its policies.
  3. Create Proxy Component B:

    • Create component B in the second project as a proxy of component A. You can either manually create component B or use a tool like AEM's Component Library Importer to import the component structure from the first project.
  4. Associate Template with Component B:

    • Associate the imported editable template from the first project with component B in the second project. This will ensure that component B inherits the policies defined in the template.
  5. Review and Adjust Policies:

    • Review the policies inherited by component B from the template and adjust them as needed to suit the requirements of the second project. You may need to make modifications to align with the specific needs of component B.
  6. Test and Validate:

    • Test component B thoroughly to ensure that it behaves as expected with the inherited policies. Verify that any adjustments made to the policies align with the functionality and design requirements of component B.

By following these steps, you can effectively reuse component policies from one project's editable template for a proxy component in another project within AEM. This approach allows for consistency and efficiency in managing component policies across different projects.

Hrishikesh Kagane