Pagination issue

Hello,

I’m having some trouble with the new Pagination element.

In a Dynamic Category Page I have a repeater that is connected to 2 different datasets.
It works fine and I’m able to switch from one page to another and my repeater elements get updated. Each repeater element is linked to its own Dynamic Item Page.

But, for example, if I go to page 3 of my repeater using the Pagination bar, click on a repeater element, go to the correspondent Dynamic Item page, and hit the back browser button, it takes me back to page 1 of my repeater.

How can I solve this and go back to page 3?

1 Like

Hi Michele!

What I would suggest is to use the Pagination’s property of get CurrentPage before navigating to the item’s page. Assign this value into a variable and use the Wix-Storage’s Session to save the value in the local storage of the user.
When the user returns to the repeater use the value in the session to jump to the correct page.

Hope that helps.

Doron.

Hello Doron,

thank you for your reply.
Following your advice I was able to get the currentPage Pagination’s property, store it in the Wix-Storage’s Session and recover it when the user returns to the repeater.
However I was not able to jump to the correct page.
I tried the following but is not working:

//jump to the correct repeater page
 let items_per_page = 6
 let repeaterData = $w("#propertiesRepeater").data
 let start_position = (currentRepeaterPageStoredInSession - 1) * items_per_page
 let end_position = start_position + items_per_page
 let slicedRepeaterData = repeaterData.slice(start_position, end_position)
    
    $w("#propertiesRepeater").data = slicedRepeaterData;
    

Any suggestion?

PAGINATION ISSUE

I also have a pagination issue for my site, thought it would be easier to post on here.

I wanted to include pagination on one of the pages on my website with a lot of content. It seems that to use Pagination bar, it has to be linked to the blog posts, which is not what I want. I have a site that has one page with a lot of content on it and would like to divide that content into numbered pages as I have done on my blog page.

Is there any way at all to do this? Any help would really be appreciated!

Chrissy

I’ve noticed a lot of people have issues with pagination and repeaters. have these been solved?!?! I can’t get mine to work (or load more) with a search function for a repeater set.

@michele-giannone @doron-alkalay

Did you manage to solve this? I have the same problem…

  • 1 with the same Problem

This thread is old and will be closed. Please search the forum for existing answers first, then create a new thread if the answers weren’t useful.