Reputation: 1338
I have a component that performs pagination with its suffix.
So, /contents/myproject/search.html/1 brings the first page displaying 10 results /contents/myproject/search.html/2 brings the second page displaying 10 different results
Now I've been asked to make it more dynamic and add a next button to page 1, so it will append the next 10 results, instead of having another separate page load.
My plan is to use JS and make an AJAX call to the following page, find the div I want, take those 10 results and append them to my first 10. The issue is that page is enormous and I would be downloading a lot of other unnecessary stuff in that call.
Is it possible to access the rendered component only? the one being added by
<cq:include path="pagination" resourceType="myproject/components/pagination" />
Upvotes: 1
Views: 301
Reputation: 1454
If you have node pagination
under /contents/myproject/search/jcr:content
with correct sling:resourceType
, then it should be pretty easy - GET request to /contents/myproject/search/jcr:content/pagination.html
.
Also it highly depends on implementation of this component if suffix will work there.
Upvotes: 1