Welcome Guest, Not a member yet? Register   Sign In
Pagination Library
#4

I've had two issues with Pagination.php library. I'm not quite sure if it's my fault or a bug:

First. If I use page numbers in my url, I have to change Pagination class so it does not apply the function "ceil". Otherwise my last page would be out of total number of rows range:

$num_pages = $this->use_page_numbers === TRUE ? (int) ($this->total_rows / $this->per_page) :
(int) ceil($this->total_rows / $this->per_page);

Second: If I want to use uri_to_assoc when processing my http-request I have to make a modification en the Pagination class so it understands my array in url segments:

public $uri_to_assoc = TRUE;
public $base_seg = 3;

elseif ($this->uri_to_assoc === TRUE)
{
$assoc = $this->CI->uri->uri_to_assoc($this->base_seg);
$this->cur_page = isset($assoc['page']) ? $assoc['page'] : '';
}

¿Is there any better method?. Thanks.
Reply


Messages In This Thread
Pagination Library - by peter2015 - 02-04-2015, 12:02 AM
RE: Pagination Library - by peter2015 - 02-04-2015, 04:49 AM
RE: Pagination Library - by Rufnex - 02-04-2015, 11:12 AM
RE: Pagination Library - by portaflex - 02-13-2015, 01:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB