You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Robin Brouns (Jira)" <ji...@apache.org> on 2023/05/16 09:17:00 UTC
[jira] [Commented] (SLING-11850) HTL: Add support for suffix manipulation in ResourceRuntimeExtension
[ https://issues.apache.org/jira/browse/SLING-11850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723064#comment-17723064 ]
Robin Brouns commented on SLING-11850:
--------------------------------------
[~radu] what do you think about this? Was there a reason to not add this feature in HTL?
> 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)