[eluser]theprodigy[/eluser]
I added the ability to change the page link separator.
This is what is in between each numeric page link. It will not be between First, Prev, Next, or Last (unless you put it in yourself ;-) )
The variable name is
$page_link_separator (for use in config array)
The public setter is
set_page_link_separator( $link_sep )
The page link separator can be set to anything.
Commonly used are:
and combination of the two
The default is set to non-breaking space.
Since I have not yet provided an example of use, here are two examples (one using config array, and one using public setters)
Example 1 (config array):
Code:
// Load the library
$this->load->library('paginate');
// Setup config array
$config = array(
'total_items' => 100,
'items_per_page' => 20,
'current_page' => 1,
'page_link_separator' => '•'
);
// Pass in config array to library
$this->paginate->configure($config);
// Get the pagination array
$this->data['pages'] = $this->paginate->get();
Example 2 (public setters) setting same items:
Code:
// Load the library
$this->load->library('paginate');
// Set the elements
$this->paginate->set_total_items(100);
$this->paginate->set_items_per_page(20);
$this->paginate->set_current_page(1);
$this->paginate->set_page_link_separator('•');
// Get the pagination array
$this->data['pages'] = $this->paginate->get();