I have a search form that stores POST data in submissions, so that the search listing remembers its "state" when i click into an individual item or another page, and then go back to the list again.
It works well for all the search parameters, but my list is paginated using CPagination component and ideally i would like to store the page in session as well.
Storing the actual value in the session(using $_SESSION and user->setState()) works as expected, but i'm having trouble setting the currentPage with the value from my session. Current code is shown as below:
Ps: I extended CPagination in the class Pagination to make the first page link have ?page=1 as compared to no "page" GET variable, so i can set the Session variable according to the GET variable.
I want to store the full state of my search list in session, so if i leave the page and return, as long as the session is still alive, the list should be in the state i left it in e.g. same page, same search parameters etc.
Problem is that i can't get the current page to load from SESSION using the code i appended above. But all other parameters are ok.