Yii Framework Forum: Number Of Link To Display At A Time In Cpagination - Yii Framework Forum

Jump to content

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

Number Of Link To Display At A Time In Cpagination Rate Topic: -----

#1 User is offline   Sujoy Bhowmick 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 27-December 12

Posted 31 January 2013 - 08:43 AM

Hi,

I am using CPagination class and i want to set no of page link to be displayed in the link section.i.e.


if i have 100 page to display i want to show only 10 links at a time like google.

I also need to mention that i am using CLinkPager widget in view
0

#2 User is offline   Imre 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 29
  • Joined: 30-March 11

Posted 31 January 2013 - 11:01 AM

What have you tried so far?

    $pages=new CPagination($count);

    // results per page
    $pages->pageSize=10;
    $pages->currentPage=3;

0

#3 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,601
  • Joined: 04-March 10
  • Location:UK

Posted 31 January 2013 - 11:18 AM

Sujoy is asking about changing the display of page links at the bottom of the page as far as I understand, not the number of items displayed on each page.
0

#4 User is offline   Imre 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 29
  • Joined: 30-March 11

Posted 31 January 2013 - 11:37 AM

hmm, yeah it was hard for me to understand but then i guess it would be

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



but the 10 is already default.
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