How do I use Codeigniter pagination inside Twig views? |
I am working on a online newspaper/blogging application with CodeIgniter 3.1.8 and Bootstrap 4. I have decided to add themes to it. The application is not HMVC, only MVC.
I thought it was a good idea to use the Twig template engine to the theme(s). For this purpose, I use CodeIgniter Simple and Secure Twig. The public views have the extension .twig, not .php. This part of the Posts controller is responsible with displaying the posts with pagination: PHP Code: private function _initPagination($path, $totalRows, $query_string_segment = 'page') { If I had classic codeigniter views, I would display the pagination on page this way (I already did, in a previous version of the project): PHP Code: <div class="pagination-container text-center"> But I now need a way to pass the pagination to Twig views. Adding the code above does not work, and I have not been able to find a viable alternative. |
Messages In This Thread |
How do I use Codeigniter pagination inside Twig views? - by Ajax30 - 11-24-2020, 03:46 AM
RE: How do I use Codeigniter pagination inside Twig views? - by sammyskills - 11-24-2020, 04:49 AM
|