I want to get the current url minus the name of the file that is currently referencing. Whether the solution is in JSP or CQ5 does not matter. However, I am trying to use the latter more to get used to it.
I use this documentation, but it does not help. CQ5 documents . In the example I found, the full current path is retrieved, but I do not know how to remove the file name from it:
<% Page containingPage = pageManager.getContainingPage(resourceResolver.getResource(currentNode.getPath()));
%>
<a href="<%=containingPage.getPath() %>.html">Profile</a>
source
share