[eluser]Unknown[/eluser]
Hi there.
I have this scenario. I have a control panel from which I manage 4 tables in my database.
For each table I have a controller, a model and a view.
So for each table I have a CRUD.
In any CRUD there is a paging system and a sorting, based on the writing of the sort values of the columns, in sessions.
When you are in one of the CRUD, I can keep the number of the page or column sorting even when I leave the URL to see the detail of the record and return to the view.
I noticed that when I go another CRUD for to work in another table, at return to the previous CRUD, keep sessions sorting, but I lose the offset. Pagination start from scratch.
I came to the conclusion, after several trials, the write offset should be carried out within the class Pagination, as this every time you load a controller recalculates the offset before you even get to the point where the session law the value previously written.
I wanted to know if anyone has an opinion or idea on how to properly save the offset value.
thanks