Hi Guys,
We are building a really large site, and we need to set some fixed components within pages of a certain template.
The problem is that, within the included component, we need to make a json call for pagination purposes.
When we use a parsys, we use something like this to make the json calls:
<script>
var currentNodePath = "<%= currentNode.getPath() %>";
...
</script>
<script>
function loadMore(pageNumber){
var baseURL = currentNodePath;
$.ajax({
url : baseURL + '.json',
type: "POST",
....
</script>
The problem here is that the customer will need to create a really big number of pages ( > 500) and it can be tedious to configure each parsys and assign the component manually.
When we use a fixed include <cq:include path="INC" resourceType="CUSTOM_COMPONENT/> the call currentNode.getPath() does not work.
Is there any way to retrieve the actual path of the component outside a parsys so a json call can be used?
Thanks in advance.