Lets imagine I have the following components in my AEM project [Using AEM as Cloud]
Component A
Component B
Component C
Now I want to create a new component (Component D) which contains Component A,B and some additional new things. I have added Component A and B using cq:template. SO when we add component D to the page the child nodes for component A and B will be automatically created.
Everything is working as expected till now. I can edit the properties of A and B individually using edit toolbar. But I want to disable the delete copy and paste options for the embedded component A and B.
So is there any way to disable/remove delete copy and paste options for child component ?
I found a solution given by @Gaurav-Behl but I am not able to open the link Gaurav if possible can u please look into it and provide the solution since you know the solution. Or anyone knows the solution please provide it
Regards
Vinith M
Views
Replies
Total Likes
in Component A and B Node Configuration:
Within the jcr:content nodes of Component A and Component B (under Component D's structure), add the cq:actions property.Set cq:actions to exclude the actions you want to disable.
cq:actions = ["edit"]
By setting it to only "edit", you will restrict the toolbar to show only the edit action, effectively hiding delete, copy, and paste actions.
Views
Replies
Total Likes
Hi @GabrielMircea this works but the option gets applied for the parent component as well
Views
Replies
Total Likes
If you’re adding this property to Component D's template definition or its children, ensure you’re targeting the embedded instances of Components A and B.
Navigate to ComponentD > jcr:content where Component A and B are defined and add cq:actions directly to each of those child nodes.
@Vinithm2I am also curious if it worked to have D back as it was. Please let me know. If not, maybe worth trying to explicitly add cq:actions on D and see how all 2 components behaves.
Hi @arunpatidar , I found your assistance incredibly helpful. It would greatly enhance the utility if this approach could be applied to different components rather than just the container component. I really appreciate your support. Thank you so much.
Regards,
Vinith M
Views
Replies
Total Likes
Views
Likes
Replies