EllisLab text mark
Advanced Search
     
Codeigniter Pagination Like Results are paginated at google search page
Posted: 11 November 2012 04:55 PM   [ Ignore ]
Joined: 2012-11-11
2 posts

I have successfully implemented codeigniter’s pagination.. But now need to modify it a bit.. I want it to look and work like the pagination on google search page.. something like this:

[first][prev] [1][2][3] ..[6].. [9][10][11] [next][last]


Any suggestion are much appreciated..

 
Posted: 12 November 2012 09:58 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2012-11-12
30 posts

try to use something like this:

$config = array(
   
.....

   
'first_link' => ' [first] ',
   
'last_link' => ' [last] ',
   
   
'next_link' => '[next] ',
   
'prev_link' => ' [prev] ',

   
'num_tag_open' => '[',
   
'num_tag_close' => ']'
   
   
'display_pages' => TRUE,

  );
  
$this->pagination->initialize($config); 

i hope it helps

 
Posted: 12 November 2012 10:12 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2012-11-11
2 posts

The problem is not the [square brackets]...!! As i mentioned i want to tweak the pagination so it functions like the pagination on stackoverflow or google..

i.e with page splits.

currently my pagination looks like..

[first][prev] [1][2][3][4][5][6][7][8][9][10][11] [next][last] 

i want it to have it some page breaks “....” continuity… hope now it s clear..

[first][prev] [1][2][3] .... [6] .... [9][10][11] [next][last] 
 
Posted: 12 November 2012 03:17 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Joined: 2007-12-30
166 posts

http://ellislab.com/forums/viewthread/229587/