Home >PHP Framework >YII >What should I do if paging in yii1.1 does not work?

What should I do if paging in yii1.1 does not work?

藏色散人
藏色散人Original
2020-07-20 10:09:132637browse

yii1.1 paging does not work because the "layout.php" file is missing, causing all js and css to fail to load. The solution is to restore the "layout.php" file and load js and css normally. Just css.

What should I do if paging in yii1.1 does not work?

Pagination style does not work

The problem is as follows:

$data = Goods::find()->Where(['is_recycle' => '0']);
$pages = new Pagination(['totalCount' =>$data->count(), 'pageSize' => '1']);
$model = $data->offset($pages->offset)->limit($pages->limit)->all();
return $this->renderPartial('index',[
   'model' => $model,
   'pages' => $pages,
]);
<?= \yii\widgets\LinkPager::widget([
    &#39;pagination&#39; => $pages,
    &#39;nextPageLabel&#39; => &#39;下一页&#39;,
    &#39;prevPageLabel&#39; => &#39;上一页&#39;,
]); ?>

Controller and view respectively. As a result, the paging code is not on the same line?

Recommended: "yii Tutorial"

Solution:

is because layout.php was deleted, causing all js and css failed to load.

The above is the detailed content of What should I do if paging in yii1.1 does not work?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn