Setting the previous and next buttons according to dataset sort

Hi,
Hopefully someone has found a solution to this…

  • I have a dynamic page displaying items from a collection.
  • I’ve sorted the dataset according to one of the columns in the collection.
  • I’ve added two buttons and connected them to show next and previous dynamic page.

I would like the previous and next to act according to the sort I’ve set to the dataset, but now it shows the next and previous items without sort. It shows them in chronological order as I’ve added them to the collection.

TIA
Anat

Hello, Anat.

I assume that you are connecting the Previous and Next buttons using data binding and the collection is filtered using code.

This can cause issues and you need to create those buttons functionality using code.

Please refer to the examples below that might be helpful:
https://support.wix.com/en/article/how-to-create-previous-and-next-buttons-for-a-dynamic-item-page
https://www.wix.com/corvid/forum/community-discussion/next-previous-buttons
https://www.grampsworkbench.com/Examples/Dynamic-Page-Loop

If you are referring to something else, please correct me and provide as much details regarding the issue (what have you done already, what is the issue exactly, screenshots, etc.).

Good luck!