Answer the question
In order to leave comments, you need to log in
How to add rel="next" in Linkpager.Yii2?
Good day everyone)
I have a code:
<?php
echo \yii\widgets\LinkPager::widget([
'pagination' => $pages,
'nextPageLabel' => "<i class='fa fa-angle-right' rel=\"next\"></i>",
'prevPageLabel' => "<i class='fa fa-angle-left'></i>",
'maxButtonCount' => 11,
'options' => ['class' => 'list-inline'],
'disabledPageCssClass' => false
]);
?>
<ul class="list-inline">
<li class="prev"><a href="/author/index" data-page="0"><i class="fa fa-angle-left"></i></a></li>
<li><a href="/author/index" data-page="0">1</a></li>
<li class="active"><a href="/author/2" data-page="1">2</a></li>
<li><a href="/author/3" data-page="2">3</a></li>
<li class="next"><a href="/author/3" data-page="2"><i class="fa fa-angle-right" rel="next"></i></a></li>
</ul>
Answer the question
In order to leave comments, you need to log in
www.yiiframework.com/doc-2.0/yii-widgets-linkpager...'linkOptions' => ['rel'=>'next']
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question