Answer the question
In order to leave comments, you need to log in
How to make pagination in Yii2 twig using LinkPager class?
In php pagination in the template is <?php LinkPager::widget([ 'pagination' => $pages,]); ?>
put in twig template - {{ use('/yii/widgets/LinkPager') }} {{ this.widget('LinkPager', { 'pages': pages } ) }} Doesn't want to work
Answer the question
In order to leave comments, you need to log in
Good afternoon.
Perhaps it would be more correct?
{{ use('/yii/widgets') }}
{{link_pager_widget({
'pagination': dataProvider.pagination
}) }}
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
$dataProvider->pagination->pageSize = 2;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question