Unnecessary dots in pagination
h-e-l-l-o-w-o-r-l-d opened this issue · comments
Hi,
if you are on pagination page 4 or on the third-last page, then the dots are unnecessary because there are no pages inbetween. They should not show up. See attached screenshots.
If lists.pagination.maximumNumberOfLinks is set to a value unlike default, then the "faulty" page shifts.
Example: set maximumNumberOfLinks = 3 -> page 3 has unnecessary dots.
So a possible solution should be tested with different settings of maximumNumberOfLinks .
Btw, blog 10 and EXT:numbered pagination did/does it right. ;)
TYPO3 10.4.23
Blog 11.0.2
I fixed this by wrapping another if condition around the ellipsis block.
<f:if condition="{pagination.lessPages}">
...
<f:if condition="{pagination.displayRangeStart - pagination.firstPageNumber} > 1">
<li class="blogpagination__item blogpagination__item--disabled blogpagination__item--ellipsis">
<a href="javascript:void();" tabindex="-1" aria-hidden="true" class="blogpagination__link">
<span class="blogpagination__itemtitle">…</span>
</a>
</li>
</f:if>
</f:if>
<f:if condition="{pagination.morePages}">
<f:if condition="{pagination.lastPageNumber - pagination.displayRangeEnd} > 1">
<li class="blogpagination__item blogpagination__item--disabled blogpagination__item--ellipsis">
<a href="javascript:void();" tabindex="-1" aria-hidden="true" class="blogpagination__link">
<span class="blogpagination__itemtitle">…</span>
</a>
</li>
</f:if>
...
</f:if>
At the end of the readme of numbered_pagination, you also find another condition.