Advertisement
Guest User

Untitled

a guest
Sep 25th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  1. $expression = $this->input->get('search');
  2. $posts_count = $this->Posts_model->search_count($expression);
  3. // set it to page so pagination know which value to update
  4. $query_string_segment = 'page';
  5.  
  6. // in case it\'s disabled
  7. $config['enable_query_strings'] = TRUE;
  8.  
  9. // Setting this config to TRUE will add existing query string arguments back into the URL after the URI segment and before the suffix
  10. $config[‘reuse_query_string’] = TRUE;
  11.  
  12. $this->_initPagination("/posts/search", $posts_count, $query_string_segment);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement