Yii Framework Forum: CLinkPager links - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CLinkPager links Rate Topic: -----

#1 User is offline   St0ffe 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 19-April 12

Posted 22 May 2012 - 08:34 AM

Hello!
Is there a way to make the CLinkPager to show "< previous 1 2 3 ... 19 20 21 next >" instead of "< previous 1 2 3 4 5 6 7 8 9 10 next >" ? have been searching alot but can't really find anything for it :/
0

#2 User is offline   yiqing95 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 599
  • Joined: 27-December 10
  • Location:china

Posted 22 May 2012 - 09:52 AM

maybe you have to extend the CLinkPager . read the source and you can override the method createPageButtons

:lol:
0

#3 User is offline   St0ffe 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 19-April 12

Posted 22 May 2012 - 11:03 AM

Do I have to override the createPageButtons function? Isn't there anything like an option in htmlOptions? :(
0

#4 User is offline   georaldc 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 103
  • Joined: 08-July 11

Posted 22 May 2012 - 11:38 AM

I think yiqing95 is right. You need to create your own class, extend CLinkPager and override createPageButton. Don't think you can achieve that any other way

EDIT:
Just realized I pretty much repeated what yiqing95 lol
0

#5 User is offline   ahmad jahangir 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 24-July 11

Posted 11 July 2012 - 03:03 AM

If you mean count of Link pages show in pagination, you can set maxButtonCount in CLinkPager like :

$this->widget('CLinkPager', array(
                    'pages' => $pages,
                    'maxButtonCount' => 21,
                ));

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users