Yii Framework Forum: Modify CListView Pagination - Yii Framework Forum

Jump to content

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

Modify CListView Pagination Rate Topic: -----

#1 User is offline   Samma 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 23-June 12

Posted 29 June 2012 - 05:07 AM

Hi, is there a way to modify CListView pagination to show pages in the format

previous page 1 of 50 next

rather than

previous 1 2 3 4 5 next

Thanks
0

#2 User is offline   rookie84 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 115
  • Joined: 16-November 11

Posted 29 June 2012 - 05:26 AM

Extend CListView?
0

#3 User is offline   Samma 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 23-June 12

Posted 29 June 2012 - 05:35 AM

Any example of how to do that to achieve what I want? Is there no elegant way to achieve this without extending the class e.g. by passing params to pager or something like that ?
0

#4 User is offline   yii new expert 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 30-May 12
  • Location:pune, india

Posted 29 June 2012 - 05:39 AM

you will be required to extend CListViewBase class renderpager method to do so
0

#5 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 920
  • Joined: 20-April 11
  • Location:India

Posted 29 June 2012 - 06:39 AM

check this http://www.yiiframew...i/1.1/CListView
Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
0

#6 User is offline   Samma 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 23-June 12

Posted 29 June 2012 - 08:35 AM

View PostRajith R, on 29 June 2012 - 06:39 AM, said:


yeah the CListView API
0

#7 User is offline   rookie84 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 115
  • Joined: 16-November 11

Posted 29 June 2012 - 11:25 PM

As i said extend CListView which extends CBaseListView

I would suggest check the CBaseListView's code and see how you want to recode the pager in the child class.
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