Цю сторінку ще не перекладено українською, тому нижче англійська версія.

pagination() html()

A pager from page => link pairs with Prev / Next.

html()->pagination($data = [], $extra = [])

Опції

ОпціяЗначення
$dataPage => link, plus prev and next links.
sizesm or lg.
aligncenter or end (right).
current, disabledCurrent page; pages shown disabled (prev, next too).
class, idClasses; id.

Приклад

Код

return html()->pagination(['1' => '#page-1', '2' => '#page-2', 'prev' => '#page-1', 'next' => '#page-3', '3' => '#page-3', '4' => '#page-4', '5' => '#page-5'], ['current' => 2, 'align' => 'center']);

Примітки

  • For paging a result set use common()->divide_pages() (the table2 pager), which renders through this widget; see the pagination demo.

Bootstrap 3 and 5

Bootstrap 3 pagination; Bootstrap 5 page-item / page-link.

Див. також: demo:html/pagination, table/render