Is there a way we can make the data-sly resource NOT EDITABLE without making the wcmmode='disabled'?
Heres my sample code:
<sly data-sly-resource="${resourceType='sample/component', wcmmode='disabled'}"></sly>
Solved! Go to Solution.
Views
Replies
Total Likes
Was able to do not editable with using READ_ONLY
https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/day/cq/wcm/api/WC...
Was able to do not editable with using READ_ONLY
https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/day/cq/wcm/api/WC...
You can prevent the component included via data-sly-resource from being editable in AEM authoring mode without disabling wcmmode. Here are two approaches:
Add the decorationTagName attribute to remove the wrapper div that enables authoring UI:
<sly data-sly-resource="${@ resourceType='sample/component', decorationTagName='none'}"></sly>
Add cq:noDecoration property to your component definition (/apps/sample/component/.content.xml):
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Component"
cq:noDecoration="{Boolean}true"/>
These methods:
1. Keep WCM mode enabled for other components
2. Only remove editability for this specific inclusion
3. Don't affect server-side rendering
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies