<?= $this->paginationControl($products,
'Sliding',
'application/partial/paginator',
['route' => 'shop/category', 'params'=>['id'=>???]]); ?>
.---------------------------------------------------------------------------------------.
| Property | Type | Description |
|---------------------------------------------------------------------------------------|
| first | integer | First page number (typically 1). |
| firstItemNumber | integer | Absolute number of the first item on this page. |
| firstPageInRange | integer | First page in the range returned by the scrolling style. |
| current | integer | Current page number. |
| currentItemCount | integer | Number of items on this page. |
| itemCountPerPage | integer | Maximum number of items available to each page. |
| last | integer | Last page number. |
| lastItemNumber | integer | Absolute number of the last item on this page. |
| lastPageInRange | integer | Last page in the range returned by the scrolling style. |
| next | integer | Next page number. |
| pageCount | integer | Number of pages. |
| pagesInRange | array | Array of pages returned by the scrolling style. |
| previous | integer | Previous page number. |
| totalItemCount | integer | Total number of items. |
'---------------------------------------------------------------------------------------'
$categoryId = $this->params()->fromRoute('id', -1);
return new ViewModel([
'categoryId' => $categoryId
]);
<?php
$this->paginationControl($products,
'Sliding',
'application/partial/paginator',
['route' => 'shop/category', 'params'=>['id'=>$categoryId]]);
?>