diff --git a/src/Control/LimitControl.php b/src/Control/LimitControl.php index b390a0a4..376d6bef 100644 --- a/src/Control/LimitControl.php +++ b/src/Control/LimitControl.php @@ -119,5 +119,11 @@ protected function assemble() 'title' => t('Change item count per page'), 'value' => $limit ]); + + if ($this->url->hasParam(PaginationControl::DEFAULT_PAGE_PARAM)) { + $this->addElement('hidden', PaginationControl::DEFAULT_PAGE_PARAM, [ + 'value' => 1 + ]); + } } } diff --git a/src/Control/PaginationControl.php b/src/Control/PaginationControl.php index e37d10a5..e7048291 100644 --- a/src/Control/PaginationControl.php +++ b/src/Control/PaginationControl.php @@ -17,6 +17,9 @@ */ class PaginationControl extends BaseHtmlElement { + /** @var string Default page parameter */ + public const DEFAULT_PAGE_PARAM = 'page'; + /** @var int Default maximum number of items which should be shown per page */ protected $defaultPageSize;