Skip to main content
sureshy2015
Level 4
Oct 16, 2015 2:28 AM UTC
Solved

How to use dta-sly-test for adaptive image component which is included in another component.

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>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Feike_Visser1
Feike_Visser1Accepted solution
Adobe Employee
Oct 16, 2015 2:28 AM UTC

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>

1 reply

Feike_Visser1
Adobe Employee
Feike_Visser1Adobe EmployeeAccepted solution
Adobe Employee
Oct 16, 2015 2:28 AM UTC

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>

Translate