Welcome Guest, Not a member yet? Register   Sign In
how to make pagination from read folder?
#2

[eluser]Madmartigan1[/eluser]
Without getting into how to actually code it, you could use GET parameters or URI segments as your "offset", and then read the array keys of $dir_objects to display the items.

So if we are on files/page/20, you can do something like this:
Code:
$per_page = 10;

$offset = $this->uri->uri_segment(3);

$dir_objects = array_slice($dir_objects, $offset, $per_page);

I would just use standard techniques to create the pagination links, I'm pretty sure the CI pagination class won't help.

Edit: Above code won't work exactly, but should get you on the right track I hope!


Messages In This Thread
how to make pagination from read folder? - by El Forum - 12-15-2010, 12:50 AM
how to make pagination from read folder? - by El Forum - 12-15-2010, 02:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB