Buy Now
Sign in

paginator without read data, possible?

emmexx , December 15 2017
Answered
E
emmexx
I have a complex query and I can't use a read data. Is it possible to retrieve data using a php fn and use the paginator?
If it's not possible this is be considered as a suggestion for an enhancement. :-)

Thank you
maxx
admin
Hi maxx,

It's possible with a few lines of PHP code but if the framework code changes then your code will not work anymore.

Best regards
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
E
emmexx
"admin":

It's possible with a few lines of PHP code but if the framework code changes then your code will not work anymore.

I made a few tries to no avail. If I change from a Read data to a php function the paginator view is displayed empty.
I suppose I should initialize the paginator but I failed.
Can you give any clue?

Thank you
maxx
admin
Hi maxx,

The paginator expects some info to be passed for it to display the results, any code you use will have to pass this info, but if the framework code changes then your code will not pass the correct info and will stop working.

I suggest that you build your own simple paginator, you can check the "semantic ui" "menu" module, class "paginator" and build a simple one using PHP since you have a different data source anyway!

Best regards
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
E
emmexx
I used CC code as a starting point to build a custom paginator.
Some beta-tester complained about the fact that the pagination persisted between different browsing sessions. They used the paginator one day, closed the browser when on, say, page 3, the following day when they opened that page they didn't expect to be where they left.
Is there some code in GCORE to manage a "pagination timeout"?
Thank you
maxx