Yii Crud Pagination Question

With the standard crud created by Gii it used to be easy and understandable how to change pagination.

Controller created a couple of revisions ago.


	/**

	 * Manages all models.

	 */

	public function actionAdmin()

	{

		$dataProvider=new CActiveDataProvider('CardType', array(

			'pagination'=>array(

				'pageSize'=>self::PAGE_SIZE,

			),

		));


		$this->render('admin',array(

			'dataProvider'=>$dataProvider,

		));

	}

Controller created with recent Yii (Gii)


	/**

	 * Manages all models.

	 */

	public function actionAdmin()

	{

		$model=new MembershipType('search');        

		$model->unsetAttributes();  // clear any default values

		if(isset($_GET['MembershipType']))

			$model->attributes=$_GET['MembershipType'];


		$this->render('admin',array(

			'model'=>$model,

		));

	}



So how do I change the number of results displayed? (pageSize)

doodle

You can comfigure this inside the dataprovider found within the MembershipType::search()

@seal

Thank you so much, it’s obvious once you point it out (isn’t everything?)

Thumbs up!

doodle