Solved
How to get the page path using page url
Hi all,
This is the page url in my local.
/content/share/coke/en/light/report-template/file_report_template is page path. How can I get this page path using java?
Thank you.
Hi all,
This is the page url in my local.
/content/share/coke/en/light/report-template/file_report_template is page path. How can I get this page path using java?
Thank you.
if you are in sling model you can get path using below code
PageManager pageManager= resource.getResourceResolver().adaptTo(PageManager.class);
Page currentPage = pageManager.getContainingPage(resource);
Thanks,
Mahesh
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.