Robin Brouns created SLING-11850:
------------------------------------
Summary: 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
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)