Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Pagination segment combined w/ text
#1

[eluser]predat0r[/eluser]
Hi all!

I have a working pagination, but I want to modify the segment handling like:

controller/category/34/page=5

So I want not only uri segment(4) as a number, but I want to put some text before.

Thank you.
#2

[eluser]Cristian Gilè[/eluser]
You can use the 5th segment:

Code:
controller/category/34/page/5


Cristian Gilè
#3

[eluser]predat0r[/eluser]
I see, but how and where to put the "page" to the uri?

Thx
#4

[eluser]cideveloper[/eluser]
Something like this

Code:
$config['uri_segment'] = 5;
$config['base_url'] = base_url().'controller/category/34/page/';

Category ID can be dynamic like this too

Code:
$config['uri_segment'] = 5;
$cat_id = $this->uri->segment(3,0);
$config['base_url'] = base_url().'controller/category/'.$cat_id .'/page/';
#5

[eluser]predat0r[/eluser]
Ohh, is it so easy? Thanks cideveloper, Cristian!




Theme © iAndrew 2016 - Forum software by © MyBB