这个其实最简单

在对应的model里找Search方法

找到后,参见如下代码

	public function search()
	{
		// @todo Please modify the following code to remove attributes that should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('nid',$this->nid);
		$criteria->compare('cid',$this->cid);
		$criteria->compare('n_title',$this->n_title,true);
		$criteria->compare('n_author',$this->n_author,true);
		$criteria->compare('n_image',$this->n_image,true);
		$criteria->compare('n_content',$this->n_content,true);
		$criteria->compare('n_click',$this->n_click);
		$criteria->compare('n_created',$this->n_created,true);
		$criteria->compare('n_updated',$this->n_updated,true);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
			//分页
			'pagination' => array(
                'pageSize' => 10,
            ),
		));
	}

//分页
'pagination' => array(
'pageSize' => 10,
),

这里就是了...修改 pageSize 就行了,views里可以不用修改

相关文章:

  • 2021-07-31
  • 2022-01-18
  • 2022-03-10
  • 2021-10-02
  • 2021-12-29
  • 2022-12-23
  • 2021-06-03
猜你喜欢
  • 2021-11-09
  • 2022-12-23
  • 2021-12-04
  • 2022-01-08
  • 2021-10-12
  • 2022-12-23
  • 2021-12-02
相关资源
相似解决方案