Skip to content

Commit

Permalink
FIX: Last page is not shown everytime
Browse files Browse the repository at this point in the history
If the "..." displayed before the last page number, the last page number was not displayed when you are on the page where the "..." disappears.

Check if the `displayRangeEnd + 1` matches the number of pages, if so add the last
page number then to the `links`-array

Resolves: Flowpack#41
  • Loading branch information
erkenes committed Feb 8, 2022
1 parent 984d95b commit 5e03544
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Classes/Fusion/PaginationArrayImplementation.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public function evaluate(): array
if ($displayRangeEnd + 1 < $numberOfPages) {
$links[] = '...';
$links[] = $numberOfPages;
} else if ($displayRangeEnd + 1 == $numberOfPages) {
$links[] = $numberOfPages;
}

if ($showPreviousNextLinks) {
Expand Down

0 comments on commit 5e03544

Please sign in to comment.