Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yes, it is possible to insert ellipsis between the first and last pages when using CodeIgniter pagination. This can be achieved by using the num_links parameter of the pagination configuration.

Here is an example code to achieve this:

$config['num_links'] = 2; // Number of links to show before/after the current page
$config['ellipses'] = true; // Display ellipses between first/last page link and adjacent number link

$this->pagination->initialize($config);

By setting the num_links parameter to 2, the pagination will display two links before and after the current page link. By enabling the ellipses parameter, ellipses will be displayed between the first/last page link and the adjacent number link.

This will result in a pagination that looks like this:

<< 1 ... 4 5 6 ... 10 >>