I'm currently trying to do the following:
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.
Any ideas what i'm doing wrong anyone?