Regarding AEM Sightly.! | Community
Skip to main content
imadullakhan
Level 3
Jun 3, 2020 4:26 AM UTC
Solved

Regarding AEM Sightly.!

Hi all,

 

I have some button in html like " <a href="#" class="btn btn-default stackbannersubmit">ENROL NOW</a>" When i pass the Value of 'ENROL NOW' that time only the button should need to visible. if i don't pass any value or 'ENROL NOW' it should't show any button. For that what i have to do, can any one help here.? 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
praveenk9057427
praveenk9057427Accepted solution
Level 2
Jun 3, 2020 5:24 AM UTC

Hi,

if you are passing value to button from dialog you can use "data-sly-test" in sightly to if value is provided or not and show button.

<a data-sly-test="${properties.<field name>}" href="#" class="btn btn-default stackbannersubmit">ENROL NOW</a>

2 replies

praveenk9057427
praveenk9057427Accepted solution
Level 2
Jun 3, 2020 5:24 AM UTC

Hi,

if you are passing value to button from dialog you can use "data-sly-test" in sightly to if value is provided or not and show button.

<a data-sly-test="${properties.<field name>}" href="#" class="btn btn-default stackbannersubmit">ENROL NOW</a>

Translate
imadullakhan
Level 3
Jun 3, 2020 6:52 AM UTC
Thank you.
Translate