I have a / payment interface where the user should be able to filter through the price range, bank and other things. These filters are the standard blocks of choice. When I submit the filter form, all the email data goes to another method called payments / search. This method performs validation, saves the post values ββin the flashdata session, and redirects the user back to / payments by passing the name flashdata to the URL.
So, my standard links to pages without filters are exactly like this:
payments/index/20/ payments/index/40/ payments/index/60/
And if you submit the filter form, the returned URL is:
payments/index/0/b48c7cbd5489129a337b0a24f830fd93
It works just fine. If I change the zero for something else, it is just paginated. However, the only problem is that <1 2 3 4 β page links do not retain the hash after page offset. CodeIgniter generates links to pages, ignoring this extra uri segment.
My uri_segment configuration is already set to 3:
$config['uri_segment'] = 3;
I cannot set uri_segment to 4 because this hash may or may not exist. Any ideas on how I can solve this? Is it mandatory for CI to have an offset as the last segment in the uri? Maybe I'm trying to use the wrong approach, so I'm all ears.
Thanks guys.
edit: Why am I passing the name flashdata through a uri that you might ask about? because it allows the user to open multiple browser tabs and perform different searches on each tab. For each filter, you create a new flashdata var.
source share