Component level policy inheritance | Community
Skip to main content
puscasd22398856
Level 2
July 20, 2022

Component level policy inheritance

  • July 20, 2022
  • 1 reply
  • 896 views

Hey fellows, 

I have the following requirement to do, and I'm trying to find a easy method to solve it ( want to avoid boring, repetitive work) :

imagine that there are 100 components already created and for each component you need to have Style System options : Apply Padding and Remove Padding.

Now, in order to avoid implementing for each component policy this options, is there a way to have inheritance from, let's say, a base policy component ? 

 

Let me know what you think.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SantoshSai
Community Advisor
Community Advisor
July 21, 2022

Hi @puscasd22398856 ,

What do you think about implementing such shared common component configuration at page level? so that author can set it up at page level and refer that configuration through Sling Model and pass it to each of the component.

Regards,

Santosh

Santosh Sai
puscasd22398856
Level 2
July 22, 2022

hi @santoshsai

thanks for answering!

can you give me more details on how to implement this solution (this will be useful in the future).

For now, I used a groovy script in order to apply the policy to each component.

 

Regards,

Puscas