[eluser]fireproofsocks[/eluser]
Here's the scenario:
1. User searches, gets 18 results, 10 per page.
2. User goes to page 2 (showing results 11-18)
3. User selects to view 25 results per page (which still ends up showing results 11-18 because the offset doesn't change)
4. POOF! The links to page one disappear.
Is this a bug? Here's the code I'm using to generate the links (in a custom library):
Code:
function get_links()
{
$config['base_url'] = $this->pagination_friendly_current_page();
$config['total_rows'] = $this->get_count();
$config['per_page'] = $this->get_limit();
$this->CI->pagination->initialize($config);
return $this->CI->pagination->create_links();
}
I'm pointing to several other functions here, but hopefully you can get the idea.
I tried passing the $config['cur_page'], but that didn't seem to have any effect. Seems to me that the pagination library needs to have an input for offset. How else does it know which page it's on?
Any ideas?