Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary dots in pagination #244

Open
h-e-l-l-o-w-o-r-l-d opened this issue Feb 11, 2022 · 1 comment
Open

Unnecessary dots in pagination #244

h-e-l-l-o-w-o-r-l-d opened this issue Feb 11, 2022 · 1 comment

Comments

@h-e-l-l-o-w-o-r-l-d
Copy link

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

blog_pagination_1
blog_pagination_2

@KreativeKrise
Copy link

KreativeKrise commented Mar 15, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants