Hello , I am using the sling dynamic include for some of the resources, it's working in expected way. My question is can we get the current page in sling dynamically included component ?
Thanks in advance !!
Views
Replies
Total Likes
Have you checked this -
${request.requestURL.toString}
Or
<sly data-sly-test.scheme="${request.scheme}"/>
<sly data-sly-test.servername="${request.serverName}"/>
<sly data-sly-test.serverport="${request.serverPort}"/>
<sly data-sly-test.val="${request.requestURI}"/>
${scheme}://${servername}:${serverport}${val}
Yes i have checked, it gets an experiance fragment's path
Hi @margaritageg Are you not able to use the HTL global object of currentPage - https://experienceleague.adobe.com/docs/experience-manager-htl/content/global-objects.html?lang=en
Hi @margaritageg ,
Can you try checking with currentPage object?
@margaritageg Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
I didn't get the answer. I had trouble using experience fragments directly as dynamic includes. So, I tried something else. Instead of using the whole experience fragment, I just took out the part I needed for the dynamic include. Now, I can control things better and get the results I want
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies