data-sly-resource added component shows twice on page as the node is present in backend | Community
Skip to main content
Level 4
July 22, 2026
Question

data-sly-resource added component shows twice on page as the node is present in backend

  • July 22, 2026
  • 0 replies
  • 13 views

Am adding below code in my custom Container component to test the data-sly-resource where i do need to use to add a component re-use based on dialog check box. 
<sly data-sly-test="${container.enableButton}">
<sly data-sly-resource="${'test-button' @ resourceType='/apps/core/wcm/components/button/v2/button', decoration=true}"></sly></sly>
OR
<sly data-sly-test="${container.enableButton}">
<div data-sly-resource="${'test-button' @ resourceType='/apps/core/wcm/components/button/v2/button'}"></div></sly>

what i have observed is the component is being rendered twice on the page, even when i add it to OOTB core components and test. Is there anything that i need to add in dialog level for the deletion of the component after uncheck of checkbox in dialog.
Is this a bug in framework of sightly ?