Yii Framework Forum: CListview Pagination variable - Yii Framework Forum

Jump to content

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

CListview Pagination variable CListview Pagination variable Rate Topic: -----

#1 User is offline   silewi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 25-October 10
  • Location:London, United Kingdom

Posted 27 June 2012 - 09:04 AM

within CListview and CGridview when I turn off ajax I set
'ajaxUpdate' = false

but the paging variable comes up with modelname_page=1 how can i set the paging variable to just 'p'
ie so p=1.

I have tried
'pageVar' => 'p'
but this doesn't work as it's not supported.
btw I am using yii 1.1.10
0

#2 User is offline   yiqing95 

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

Posted 27 June 2012 - 10:38 AM

try:
$dataProvider->getPagination()->pageVar = 'p';

$this->widget('zii.widgets.grid.CGridView', array(
    'dataProvider'=>$dataProvider,
));
// if it works  the CListView goes the same way

:D
0

#3 User is offline   silewi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 25-October 10
  • Location:London, United Kingdom

Posted 27 June 2012 - 12:07 PM

That worked, Many Thanks ! :D
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