Expand my Community achievements bar.

SOLVED

Is there a way to test sightly code at runtime without a deployment?

Avatar

Level 2

I have some code like this in an html page:

<sly data-sly-test="${properties.showPinterestSave == 'true'}">

For some reason that I cannot tell, the code using this is not working on some pages on our published environments.  I can look in crx and I see this value appears to be correct.  I could add something to the page to display these values, but then I have to go through a pull request and code deployment.  I need to move more quickly than that.  Is there a way to test values like this at runtime?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @jeremyc82321732 ,

AEM HTL Read–Eval–Print Loop - helps to achieve that.

"A live code editing environment for HTL templates with optional server-side JavaScript logic, executed on an Adobe Experience Manager instance. This little tool is great for learning HTL and for experimenting with it, because the resulting output is displayed as you type."
repl.png

For more details please go through the documentation here: https://github.com/adobe/aem-htl-repl

Hope that helps!

Regards,

Santosh

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @jeremyc82321732 

 

You can test the sightly code in your local CRX and if it's working fine, raise a PR and deploy the changes in the respective environments. If you have CRX access on Dev environment, you an test it there too but the preferred way is to test your changes locally first.

Avatar

Level 2

Everything works fine locally.  It's only when it goes to the cloud that things fail.

How can I test this in CRX?  Besides just expanding the node and seeing the value?

Avatar

Community Advisor

Do you have this property showPinterestSave authored in cloud instance? Instead of expanding the nodes in CRX, you can append the infinity.json at the end of the author URL and check whether this property is available or not in the content page.

Avatar

Correct answer by
Community Advisor

Hi @jeremyc82321732 ,

AEM HTL Read–Eval–Print Loop - helps to achieve that.

"A live code editing environment for HTL templates with optional server-side JavaScript logic, executed on an Adobe Experience Manager instance. This little tool is great for learning HTL and for experimenting with it, because the resulting output is displayed as you type."
repl.png

For more details please go through the documentation here: https://github.com/adobe/aem-htl-repl

Hope that helps!

Regards,

Santosh