Forums

paginator without read data, possible?

emmexx 15 Dec, 2017
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
Max_admin 16 Dec, 2017
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, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
emmexx 10 Jan, 2018


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
Max_admin 15 Jan, 2018
Answer
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, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
emmexx 22 Feb, 2018
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
This topic is locked and no more replies can be posted.