top of page

Pagination

Illustrates how to create your own pagination bar and paginate your query results.

Uses a SelectionTags element for the pagination bar. It does NOT use Wix's built-in Pagination element.

Wix's pagination element is really very crappy. For some reason, it never knows how to center itself, and it adds a weird number of entries whenever you click on it to change the design. It also only works automatically with datasets. If you want to use it with a WixDataQuery, you have to roll your own logic anyway.

TODO - This builds a row of buttons corresponding to the number of pages. If the number of pages is large, it will wrap and look ugly. Consider implementing a limit on the number of selection tags in the button bar, with prev and next options.

TODO - Implement findPageContaining

Apple

Banana

Carrot

bottom of page