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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Restrict property loading from core component

Avatar

Level 5

Hello - I am extending the OOTB core component by adding it in our project, say,  /apps/site/ and using sling:resourceSuperType pointing it to the core component. I wanted to remove some of the dialog fields and modify the behavior of the default selection of the radio or checkbox selection. Let us say, If I remove the field from the custom dialog, it is still loading from the OOTB core component as we are pointing to the core component using sling:resourceSuperType.

 

Is there any way to restrict the dialog property to load from the core component? I know we have the sling:hideProperties but not sure if this can be used to restrict my use case. 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @v1101 

 

Yes, you can remove the fields which ever you want from the proxy component and add the new fields as required.

 

As you mentioned you will need to use the sling:resourcSuperType property to proxy the core component and add only the new properties that is required in the proxy component. Now to remove the fields which are loading from core component you need to add the property node in proxy component and add the sling:hideResource as true which will hide the current property.

 

I have extended the title component from core in we-retail and added a new property 'New Property' and removed the existing 'LinkURL' property.

asutosh_jena_0-1620971187765.png

 

If you see below dialog, the new property is added and the exisitng property 'LinkURL' is removed from my proxy component dialog.

asutosh_jena_1-1620971241998.png

 

Hope this helps!

Thanks

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @v1101 

 

Yes, you can remove the fields which ever you want from the proxy component and add the new fields as required.

 

As you mentioned you will need to use the sling:resourcSuperType property to proxy the core component and add only the new properties that is required in the proxy component. Now to remove the fields which are loading from core component you need to add the property node in proxy component and add the sling:hideResource as true which will hide the current property.

 

I have extended the title component from core in we-retail and added a new property 'New Property' and removed the existing 'LinkURL' property.

asutosh_jena_0-1620971187765.png

 

If you see below dialog, the new property is added and the exisitng property 'LinkURL' is removed from my proxy component dialog.

asutosh_jena_1-1620971241998.png

 

Hope this helps!

Thanks