I would like to let user to choose the no. of record per page. Is there anyone can share the code?
I am thinking of leveraging $x->RecordsPerPage = $pagenumber; and create a table to let users to specify page number eg. 25 instead of hard-coded?
But, how to store that in the session when a user modify the value in the table? Please advise.
RecordsPerPage = $pagenumber
Re: RecordsPerPage = $pagenumber
Hi,
I think you can modify the $option->RecordsPerPage value in the _init function.
So you can create a table where the user can enter eiher a global value or even an individual value per table for the RecordsPerPage.
In the _init hook you just need to check if there is an entry in the user table and update the $option->RecordsPerPage
Hope that gives a starting point
I think you can modify the $option->RecordsPerPage value in the _init function.
So you can create a table where the user can enter eiher a global value or even an individual value per table for the RecordsPerPage.
In the _init hook you just need to check if there is an entry in the user table and update the $option->RecordsPerPage
Hope that gives a starting point
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: RecordsPerPage = $pagenumber
thanks. It works.