You can always simply create a .php file with an array of parameters and require_once() in your model and return to the pagination initiator. Or itβs better to create a model / library that will return you all the settings.
Model:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $pagination_config = array( 'full_tag_open' = '<p>', 'full_tag_close' = '</p>', // ... ); class Pagiconf extends CI_Model { public function load() { $this->load->library('pagination'); $this->pagination->initialize($config); return $this->pagination->create_links(); } }
Wherever:
$this->load->model('pagiconf'); echo $this->pagiconf->load();
source share