Hi Team,
Can I know pagination for Sites and Assets.
How much limitation for the pagination?
example: if we have 100 pages in a site, how much it could be display for the first pagination. like 10 or 20 pages?
Regards
Chandrika
Solved! Go to Solution.
Views
Replies
Total Likes
If you are using query builder API to get those say those 100 pages , you can use parameter "offset" to get the results in chunks(10 or 20). please check this out.
How are you getting those 100 pages/assets? Just looping through the specific node or Query builder Search ?
If you are using query builder API to get those say those 100 pages , you can use parameter "offset" to get the results in chunks(10 or 20). please check this out.
How are you getting those 100 pages/assets? Just looping through the specific node or Query builder Search ?
Hi @chandrika123 , I am assuming that you are trying to add pagination for one of your page, so you should be able to decide it according to the business requirement and UX design.
If you are using querybuilder api, it will return all results with p.limit=-1 (this might be a high number depending on your instance).
If you want to implement pagination then you can use offset and limit like this
path=/content/<project>/us/en/products type=cq:Page property=jcr:content/@commerceType property.value=Product Family p.guessTotal=true p.offset=0 p.limit=35
it will give you results 35 at one time.
p.guessTotal parameter is to return the appropriate number of results that can be shown by combining the minimum viable p.offset and p.limit values. The advantage of using this parameter is improved performance with large result sets.
p.limit- defines page size. In simple words how many records you want to fetch.
p.offset-defines start of index means from which index you want to fetch records from query result.
Below query will give you all results
path=/content/project/us/en/products type=cq:Page property=jcr:content/@commerceType property.value=Product Family p.limit=-1
Refer querybuilder cheat sheet- https://github.com/paulrohrbeck/aem-links/blob/master/querybuilder_cheatsheet.md
Views
Likes
Replies
Views
Likes
Replies