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?

藏色散人
Release: 2020-07-20 10:09:13
Original
2638 people have browsed it

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;,
]); ?>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template