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

Paginator first_item and last_item #1296

Open
stephenmeehanuk opened this issue Jan 22, 2025 · 0 comments
Open

Paginator first_item and last_item #1296

stephenmeehanuk opened this issue Jan 22, 2025 · 0 comments

Comments

@stephenmeehanuk
Copy link

Hi

when using auto_links I can see it outputs this

Showing 21 to 30 of 74 results

The blade template for this is:

{!! __('Showing') !!}
                    @if ($paginator->firstItem())
                        <span class="font-medium">{{ $paginator->firstItem() }}</span>
                        {!! __('to') !!}
                        <span class="font-medium">{{ $paginator->lastItem() }}</span>
                    @else
                        {{ $paginator->count() }}
                    @endif
                    {!! __('of') !!}
                    <span class="font-medium">{{ $paginator->total() }}</span>
                    {!! __('results') !!}

I'd like to recreate this in Antlers. but there doesn't appear to be an equivalent to {{ $paginator->firstItem() }} and {{ $paginator->lastItem() }}

{{ total_items }} outputs the same as {{ $paginator->total() }}

Can this be added to a future release?

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

1 participant