views:

403

answers:

1

I'm using Kohana's pagination library and it lets you specify the parameter uri_segment at initialization.

When it generates the pages links, they will have that uri_segment you specified, and after that, the page link. Let's say: /some/uri/segments/6 where 6 is the page.

Now, that enforces the page number to be the last uri segment. What if your URI schema needs to have more segments after the page, which is my case, as I'm making a search controller that can have a variable amount of optional search parameters, but as the page number is not optionalm it has to be at the beginning.

Thanks!

PS: hey there's no uri or uri-segment tags, they might be useful.

+1  A: 

Solved. by using the parameter base_url, you can specify all the URI segments, and in uri_segment (a number) you specify which one of those is to be replaced by the page number.

Petruza