Page 1 of 1
pagination in module action
Posted: Sun Mar 14, 2021 5:40 am
by rotezecke
Can someone point me in a direction of a current module that implements pagination for frontend, or more specifically: I'm trying to integrate pagination with the Holidays module and its HolidaysQuery class. Thanks.
Re: pagination in module action
Posted: Sun Mar 14, 2021 9:56 am
by velden
News module? action.default.php for example
Re: pagination in module action
Posted: Sun Mar 14, 2021 10:15 am
by rotezecke
the holiday module uses
Code: Select all
$query = new HolidayQuery(array('published'=>1,'limit'=>$limit));
$holidays = $query->GetMatches();
News (or cgblog) seem to do all the sql stuff inside the action.default file. can pagination be achieved with the above class? assuming that such a query class is best practice? i could just scrap the Holiday approach and clone the News approach, but that would be leaving the path of the tutorial before i even completed it. but I'm not clever enough to combine the two approaches.