0
votes

I am looking for Apache Sling Api to build url and links. I have found a URLHandler and LinkUrl but i should install Adobe cq as bundle and this is not what i want.

Can any one recammand an API for URL? Thanks

1
Can you pls explain what you mean by building url and links ? Some example code that you're trying may help other people look at the issue.Abhishek
wcm.io/handler/url/apidocs/io/wcm/handler/url/UrlHandler.html : something like that, this is for adobe cq, but i use only sling for this projectAyoub Abid
I don't have experience with wcm.io but this says that it is an open source project and you should be able to include this library as a dependency in your project. yes/no ?Abhishek

1 Answers

0
votes

Depending on what you want to do with the URL, you can maybe have a look at Adobes Templating Language called "HTL" or "Sightly". There you can build urls like this.

<a href="${currentPage.path @selectors='mySelector', extension='json'}>...</a>

you can also attach request parameters by generating a map either in a Java class oder JavaScript and then add the @query='myModel.requestParameterMap'

I hope this will help you.