I included adaptive image component in another component.
I do not want this div to be generated if the image is not authored.how can i use data-sly-test in this context?
<div class="col-content-inner">
<div data-sly-resource="${@path='adaptiveimage', resourceType='/apps/mda/components/content/adaptiveimage'}">
</div>
Solved! Go to Solution.
Views
Replies
Total Likes
This should unwrap the image when you are not in edit-mode.
<div class="col-content-inner">
<div data-sly-unwrap="${!wcmmode.edit}" data-sly-resource="${@path='adaptiveimage', resourceType='/apps/mda/components/content/adaptiveimage'}">
</div>
Views
Replies
Total Likes
This should unwrap the image when you are not in edit-mode.
<div class="col-content-inner">
<div data-sly-unwrap="${!wcmmode.edit}" data-sly-resource="${@path='adaptiveimage', resourceType='/apps/mda/components/content/adaptiveimage'}">
</div>
Views
Replies
Total Likes