I will try give a more detailed explanation in the evening today
I have the repeating group in a Reusable element. But that can also be the page or group the RG is located.
Custom States
- first_page
- current_page
- last_page
- current_page_start
- page_size
Pagination - List of Numbers (plugin)
- Length of list
Workflow - Pageload
- Set current page to 1 (only when current_page = 0)
- Calculate last page:
- Trigger Custom Event: Calculate current page start
Workflow - Previous (click)
- Set state current_page to current_page - 1
- Trigger Custom Event: Calculate current page start
Workflow - Next (click)
- Set state current_page to: current_page + 1
- Trigger Custom Event: Calculate current page start
Workflow - Pagenumber (click)
- Set state current_page to: current_page = current cell page number
- Trigger Custom Event: Calculate current page start
Data source Repeating group:
- :items from current_page_start
- :items until page_size