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

Radu Cotescu commented on SLING-11850:
--------------------------------------

We never thought about adding support for the suffix, as that doesn't influence 
which script will be picked up at rendering time, but I can see why the feature 
could be useful.

> HTL: Add support for suffix manipulation in ResourceRuntimeExtension
> --------------------------------------------------------------------
>
>                 Key: SLING-11850
>                 URL: https://issues.apache.org/jira/browse/SLING-11850
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>    Affects Versions: Scripting HTL Engine 1.4.22-1.4.0
>            Reporter: Robin Brouns
>            Priority: Minor
>              Labels: Sightly
>
> In JSP there is the possibility to include a resource in a component and 
> adjust the suffix of the sub-request, processing this resource:
> {code:java}
> <sling:include 
>     path="my-component"  
>     resourceType="application/components/other-component"  
>     replaceSuffix="some-suffix"/>
> {code}
> See also: 
> [https://github.com/apache/sling-org-apache-sling-scripting-jsp-taglib/blob/7835da79f1de7c9c14fd478e9fec23f54fd6d711/src/main/java/org/apache/sling/scripting/jsp/taglib/AbstractDispatcherTagHandler.java#L89]
> But HTL lacks this option to adjust the suffix for the sub-request (by using 
> data-sly-resource): see 
> [https://github.com/apache/sling-org-apache-sling-scripting-sightly/blob/3b50f91c4f600081f0585e50dfb775c4b2856b89/src/main/java/org/apache/sling/scripting/sightly/impl/engine/extension/ResourceRuntimeExtension.java#L58]
>  
> Is there a reason why this feature wasn't added and is not supported right 
> now?
> Because we can manipulate the suffix in a URI context in HTL 
> ([https://github.com/apache/sling-org-apache-sling-scripting-sightly/blob/3b50f91c4f600081f0585e50dfb775c4b2856b89/src/main/java/org/apache/sling/scripting/sightly/impl/engine/extension/URIManipulationFilterExtension.java#L221),]
>  but just not in the Resource context.
> The _RequestDispatcher_ is already available and used in the 
> _ResourceRuntimeExtension_ so it could be added.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to