[ 
https://issues.apache.org/jira/browse/SLING-9762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17200796#comment-17200796
 ] 

Georg Henzler commented on SLING-9762:
--------------------------------------

So for now it would be 
[rr.map()|https://sling.apache.org/apidocs/sling11/org/apache/sling/api/resource/ResourceResolver.html#map-javax.servlet.http.HttpServletRequest-java.lang.String-]
 - mid-term the idea would be to use [PathToUriMappingService.map(request, 
path)|https://github.com/apache/sling-org-apache-sling-api/blob/415ec0d4b3dfb184d653571364a07d821a890a10/src/main/java/org/apache/sling/api/resource/mapping/PathToUriMappingService.java#L67]
 (once this is implemented rr.map() will just call 
PathToUriMappingService.map())

With SLING-9662 implemented, the SPI interface 
[SlingUriMapper|https://github.com/apache/sling-org-apache-sling-api/blob/415ec0d4b3dfb184d653571364a07d821a890a10/src/main/java/org/apache/sling/spi/urimapping/SlingUriMapper.java]
 will allow to contribute custom mappings (while others might be fine with 
today's /etc/maps that will come as one ootb SlingUriMapper in the chain)

> Automatic Mapping of URIs in HTL
> --------------------------------
>
>                 Key: SLING-9762
>                 URL: https://issues.apache.org/jira/browse/SLING-9762
>             Project: Sling
>          Issue Type: New Feature
>          Components: Scripting
>            Reporter: Georg Henzler
>            Assignee: Radu Cotescu
>            Priority: Major
>
> There should be the possibility to automatically map non-absolute URIs in HTL 
> (that is 
> [URI.isAbsolute()|https://docs.oracle.com/javase/8/docs/api/java/net/URI.html#isAbsolute--]
>  = false). If all URIs are mapped automatically or not should be globally 
> configurable and then be overridden if necessary in HTL as follows:
> {code}
> <a href="${'/content/path/to/page.html' @ mapUri=false}"/>
> {code}
> If auto-mapping is globally deactivated, the following should allow to 
> activate it:
> {code}
> <a href="${'/content/path/to/page.html' @ mapUri=true}"/>
> {code}
> See https://www.mail-archive.com/[email protected]/msg98145.html for 
> initial discussion



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to