• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pagination & Search Queries

#1
[eluser]malzahar[/eluser]
I'm having some trouble with a search feature in my current project. I have results that are displayed normally across several pages using pagination. However, when trying to add a custom search term it completely breaks the pagination.

Is there an elegant solution to making pagination work with search queries?

I noticed there is a config option to change how the URL's for pagination are setup

Code:
$config['page_query_string'] = TRUE

Which would turn
Code:
http://example.com/index.php/test/page/20

into
Code:
http://example.com/index.php?c=test&m=page&per_page=20

But when I try to use it I get an "The URI you submitted has disallowed characters." error.

I'm sure others have faced this problem but I can't seem to find a good solution as of right now

#2
[eluser]Mr. Pickle[/eluser]
If you want to use GET parameters you have to allow it in the CI config file, I guess it's called:

Code:
$config['enable_query_strings'] = TRUE;


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.