Keep page number and pass it to controller actions

I want to somehow store the current page number of the CPagination object and use it when calling actions inside the same controller. For example, I have a paginated listing of items and action links on each item. When clicking on each item action, I would like to use the current page number from the paginated list and redirect the user to the same page after the action call. Of course, one way is to pass the page number as parameter to the action, but when you have many actions, this is too much work. I thought of using a private member variable in the controller class, but then I realized that its value doesn’t persist through each action call.

Other than a session variable, is there another way that I’m missing to implement this feature?

I think


is the right place

And this actually stores the variable in the user’s session. So, I guess this is the way to go.