Welcome Guest, Not a member yet? Register   Sign In
Pagination, filtering results and Get variables
#1

[eluser]gh0st[/eluser]
I have a paginated list of items (ie: people who reside in a country) which my client requires filters for the country name.

However, GET is switched off and it is very hard to switch GET back on, and still keep the clean URLs.

Although there is only one filter for this page, the next page has 3 filters.

What I don't want it something like this though

someurl.com/[controller]/[method]/[page]/[s<omething]/[something]/[something] .... etc

Because what happens if the second [something] is not there?

I've tried switching the use Get on in the config and switching to PATH_INFO, but this ruins all the URLs.

I just want to do this:

someurl.com/[controller]/[method]/[page]/?filter1=&filter2;=

Is it not possible to do this?

Thanks.
#2

[eluser]gh0st[/eluser]
How do I add variables, such as a country to the pagination config so that when it generates the pagination links it adds the proper structure automatically?

For example;

Code:
// Pagination config
$config['base_url'] = base_url() .'cms/gallery/index/';

The structure of my URI is thus;

Code:
/cms/gallery/index/[page]/[country]/

My aim is to make the $this->pagination->create_links(); auto create the right links without me having to do that much.

Obviousily I can't put the page in after the /index/ in my config because the page will never move, but I really need to add other variables into the create_links() output.

How do I do this?

Thanks




Theme © iAndrew 2016 - Forum software by © MyBB