Yii 1.1: elistview

Extends CListView With PageSize Menu

Extends CListView for selecting `List View' page size. You can use EListView in place of CListView (Takes all the same Params and adds a few new ones).

You will get a select menu with a list of various page sizes that you define while maintaining the current start position.



Yii 1.7 or above


<?php $this->widget('ext.widgets.EListView.EListView', array(
  'itemsPerPageMenuItemOptionSufix'=>'Per Page',
  'scrollToItem'=>array('on'=>'MISMATCH', 'containerEntity'=>'body', 'itemClass'=>'view'),
  'renderMenuInAltDomElmWithID'=>false, //use and DOM ELEMENT ID IE "myID"
)); ?>


itemsPerPageMenu: Sets the values for the `Items Per Page Menu'

**Example:** 'itemsPerPageMenu'=>array(10,20,50,100,200,500),

itemsPerPageMenuItemOptionPrefix: Sets the display prefix in the `Items Per Page Menu' PREFIX X SUFFIX ie VIEW 10 Per Page

**Example:** 'itemsPerPageMenuItemOptionPrefix'=>'View'

itemsPerPageMenuItemOptionSufix: Sets the display suffix in the `Items Per Page Menu' PREFIX X SUFFIX ie VIEW 10 Per Page

**Example:** 'itemsPerPageMenuItemOptionSufix'=>'Per Page'

itemsPerPageMenuClass: Sets the Class of the `Items Per Page Menu' <select class=".$itemsPerPageMenuClass"...

**Example:** 'itemsPerPageMenuClass'=>'ippm'

scrollToItem: Array that Sets the scroll to item in view attributes. This is usefull when swithing between page sizes. on => When to scroll. Choices: ['ALWAYS', 'MISTACH', 'NEVER'] containerEntity => The Dom element to scroll itemClass => The Class of the Dom Elment that contain the individual items.

 **Example:** 'scrollToItem'=>array('on'=>'MISMATCH', 'containerEntity'=>'body', 'itemClass'=>'view')

renderMenuInAltDomElmWithID: Sets the #ID of the DOM element where you would like to render the menu. By default (false) the `Items Per Page Menu' will be rendered in the summary section.

**Example:** 'renderMenuInAltDomElmWithID'=>false, //Render `Items Per Page' menu in DOM Element with ID "myID"


Total 2 comments

#9321 report it
karmraj at 2012/08/03 04:54am
Carefull for :

Please uncomment "urlManager" setting from configuration file and also add some required rule for proper pagination.


#7377 report it
Vince. at 2012/03/18 07:35pm
Nice work

Nice work

Leave a comment

Please to leave your comment.

Create extension