How to keep a component unlocked through code in AEM as a Cloud Service | Community
Skip to main content
New Participant
August 25, 2022

How to keep a component unlocked through code in AEM as a Cloud Service

  • August 25, 2022
  • 1 reply
  • 532 views

I have created a custom component in which I wanted to use the Text Core Component. In HTL, I have added the following code for the same: 

<sly data-sly-test="${wcmmode.edit}"> <div data-sly-resource="${'Text' @resourceType='/apps/my-project/components/text', decorationTagName='div'}"></div> </sly>

I have added my component in the template and kept it locked. Just wanted that the texy component in that should be unlocked. For that, I unlock the text component in the template. In page, for first time, the text component is editable. But once it is edited, it gets locked in the template by itself and the text which I edited shows in the template which should not happen. How can I set my text component in the custom component unlocked?

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

1 reply

Shashi_Mulugu
New Participant
July 25, 2023

@nikita24tailor did you marked your parent custom component as Container component?