Sightly Issue : data-sly-test: redundant constant value comparison | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
aem_rawAccepted solution
Level 2
Jun 30, 2021 3:49 AM UTC

Use "data-sly-set" instead of "data-sly-test" to define variable to get rid of this error

Example:

<sly data-sly-set.variableName=${'value'}>

 

 

3 replies

aem_rawAccepted solution
Level 2
Jun 30, 2021 3:49 AM UTC

Use "data-sly-set" instead of "data-sly-test" to define variable to get rid of this error

Example:

<sly data-sly-set.variableName=${'value'}>

 

 

Translate
BrianKasingli
New Participant
Jan 6, 2021 3:00 PM UTC

 

@sumit1191 

You can store / not-store the returned value, something like this:

 

// example 1 : store the returned value, and use it <sly data-sly-test.skuNumber="${mymodel.skuNumber}"> <p>SKU Number: ${skuNumber}</p> </sly> // example 1 : not-store the returned value, rather wrapping block of code <sly data-sly-test="${wcmmode.edit}"> <p>Welcome the the edit mode</p> </sly>

 

 

Translate
Kiran_Vedantam
New Participant
Jan 6, 2021 1:53 PM UTC

Hi @sumit1191, Can you please elaborate on your query.

 

Thanks,

Kiran Vedantam.

Translate