Welcome Guest, Not a member yet? Register   Sign In
Pagination problem.
#8

[eluser]peekk[/eluser]
I have 1 more question, and i think it's not worth to create a new topic for it (it seems not hard). How can i do, that my links will be example.com/search/searcher/<OFFSET>/keyword - I mean I want to change the order of keyword and offset of my URLs, I was trying by routing, but I couldn't do this. My try was about that:

Code:
function searcher(offset=0,$keyword=''){
    (...)
    $this->load->library('pagination');

    $config['base_url'] = base_url().'search/searcher/'.$offset.'/'.$keyword.'/';
    $config['total_rows'] = '100';  
    $config['full_tag_open'] = '<p>';
    $config['full_tag_close'] = '</p>';
    $config['per_page'] = 25;
    $config['uri_segment']=3

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

    $offset = $this->uri->segment(3);
  if(!$offset){$offset=0;}      
    
    $answer = new stdClass;
    $answer = $this->searchermodel->search($kryteria, 25, $offset, $keyword,'');
}

I just need to change order in URLs, and make it work. How to do it?


Messages In This Thread
Pagination problem. - by El Forum - 02-22-2012, 05:58 AM
Pagination problem. - by El Forum - 02-22-2012, 06:52 AM
Pagination problem. - by El Forum - 02-22-2012, 08:07 AM
Pagination problem. - by El Forum - 02-22-2012, 08:11 AM
Pagination problem. - by El Forum - 02-22-2012, 08:19 AM
Pagination problem. - by El Forum - 02-22-2012, 08:23 AM
Pagination problem. - by El Forum - 02-22-2012, 04:13 PM
Pagination problem. - by El Forum - 02-23-2012, 07:26 AM
Pagination problem. - by El Forum - 02-23-2012, 07:37 AM
Pagination problem. - by El Forum - 02-23-2012, 07:55 AM
Pagination problem. - by El Forum - 02-23-2012, 08:01 AM
Pagination problem. - by El Forum - 02-23-2012, 08:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB