You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2020/03/05 13:52:36 UTC

[GitHub] [sling-org-apache-sling-dynamic-include] jfmitchell commented on a change in pull request #14: SLING-9174: Added the code for enhancement

jfmitchell commented on a change in pull request #14: SLING-9174: Added the code for enhancement
URL: https://github.com/apache/sling-org-apache-sling-dynamic-include/pull/14#discussion_r388305344
 
 

 ##########
 File path: src/main/java/org/apache/sling/dynamicinclude/IncludeTagFilter.java
 ##########
 @@ -166,8 +167,22 @@ private String getUrl(Configuration config, SlingHttpServletRequest request) {
     private String buildUrl(Configuration config, SlingHttpServletRequest request) {
         final Resource resource = request.getResource();
 
+        // The below code gets the path to the XF and then passes it to the buildUrl method
+        // so that the path to the component is replaced with path to the XF
+        ValueMap vm = resource.adaptTo(ValueMap.class);
 
 Review comment:
   I would base the code on the resource type rather than the existence of a property.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services