Solved
Encoding url in sightly
Hi All,
Some of documents url have space in them, I want to encode them in sightly it is possible to do so.
I have tried using context uri but that also did not worked
${properties.jcr:title @ context='uri'} Hi All,
Some of documents url have space in them, I want to encode them in sightly it is possible to do so.
I have tried using context uri but that also did not worked
${properties.jcr:title @ context='uri'} You can use JavaScript Use API,, assume this code is present in file name first.js
"use strict"; use(function () { eurl = encodeURI(this.url); return eurl; });and call this via
<sly data-sly-use.info="${'first.js' @ url=properties.jcr:title}"> <h1> ${info} </h1> </sly>Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.