这个其实最简单
在对应的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里可以不用修改