diff --git a/src/Views/post-list.phtml b/src/Views/post-list.phtml index 912cf9b6..7c539ecf 100644 --- a/src/Views/post-list.phtml +++ b/src/Views/post-list.phtml @@ -31,49 +31,51 @@ if (!function_exists('pageUrl')) } ?> - - - context->transport->page > 1): ?> - - - - - - « - - +context->transport->pageCount; + $delta = 3; + $pagesVisible = array_merge($pagesVisible, range($this->context->transport->page - $delta, $this->context->transport->page + $delta)); + $pagesVisible = array_filter($pagesVisible, function($x) { return $x >= 1 and $x <= $this->context->transport->pageCount; }); + $pagesVisible = array_unique($pagesVisible); + sort($pagesVisible, SORT_NUMERIC); +?> - context->transport->pageCount; - $delta = 3; - $pagesVisible = array_merge($pagesVisible, range($this->context->transport->page - $delta, $this->context->transport->page + $delta)); - $pagesVisible = array_filter($pagesVisible, function($x) { return $x >= 1 and $x <= $this->context->transport->pageCount; }); - $pagesVisible = array_unique($pagesVisible); - sort($pagesVisible, SORT_NUMERIC); - ?> - - - context->transport->page): ?> - + + + + context->transport->page > 1): ?> + - + - - + + « - - context->transport->page < $this->context->transport->pageCount): ?> - - - - - - » - - - - + + context->transport->page): ?> + + + + + + + + + + + context->transport->page < $this->context->transport->pageCount): ?> + + + + + + » + + + + +