How can I modify the pagination [SOLVED]

#1
[eluser]bronet[/eluser]
Hy there!

I have a lil' question about how can i modify the pagination urls from:

Quote:domain.com/blog/ - page 0
domain.com/blog/page/2 - page 1
domain.com/blog/page/3 - page 2

TO:
Quote:domain.com/blog/ - page 1
domain.com/blog/page/2 - page 2
domain.com/blog/page/3 - page 3

? The second quote imitates the Wordpress pagination style and I think it's better than the default example. Thx! Wink

#2
[eluser]victorche[/eluser]
I don't think you can use the pagination class like this at all. I mean... using the built in pagination class in CI is giving you the option to have urls with the offset you choose. Which means, if you want to display 10 items by page, your urls will look like:
/page/10
/page/20
/page/30
Or like in these forums... Check the links here, please. The displayed topics per page are 25, that's why the links are with the offset, like:
/P25
/P50
/P75

This is something which I don't like, personally... There was a topic in the "Requests" section here about this. And a good piece of code how to change this to have a normal pagination with the number of the pages in the url. But unfortunately it was for 1.7.2 and I am using CI 2.0
In 2.0 the pagination class is a little bit different than in 1.7.2 Wink

#3
[eluser]bronet[/eluser]
[quote author="victorche" date="1285777245"]I don't think you can use the pagination class like this at all. I mean... using the built in pagination class in CI is giving you the option to have urls with the offset you choose. Which means, if you want to display 10 items by page, your urls will look like:
/page/10
/page/20
/page/30
Or like in these forums... Check the links here, please. The displayed topics per page are 25, that's why the links are with the offset, like:
/P25
/P50
/P75

This is something which I don't like, personally... There was a topic in the "Requests" section here about this. And a good piece of code how to change this to have a normal pagination with the number of the pages in the url. But unfortunately it was for 1.7.2 and I am using CI 2.0
In 2.0 the pagination class is a little bit different than in 1.7.2 Wink[/quote]

Thank you so much! I'll search on "Requests"...

LE: DONE! link

#4
[eluser]Unknown[/eluser]
Thanks from me too, solved my problem!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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