Answer the question
In order to leave comments, you need to log in
Why does the LinkPager widget display links with GET parameters (not CNC)?
In the router:
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules'=>array(
''=>'main/index',
'<region>' => 'main/index',
'<region>/<category>' => 'main/index',
'<region>/<category>/<page:\d+>' => 'main/index',
),
],
$pages = new \yii\data\Pagination(['totalCount' => $query->count(), 'pageSize' => PER_PAGE, 'pageSizeParam' => false, 'forcePageParam' => false]);
<?= \yii\widgets\LinkPager::widget(['pagination' => $pages]) ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question