Expand my Community achievements bar.

SOLVED

Components policy Inheritance in Editable templates

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@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

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@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

Avatar

Level 10

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.