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

Is there any way to get counter on endless pagination items? #89

Open
jpatel3 opened this issue Sep 1, 2015 · 1 comment
Open

Is there any way to get counter on endless pagination items? #89

jpatel3 opened this issue Sep 1, 2015 · 1 comment

Comments

@jpatel3
Copy link

jpatel3 commented Sep 1, 2015

I am using it to display a grid (div based) to display list of items with endless pagination. I tried to use forloop.counter however, every time it gets new set of items in queryset it starts the counter from 1 on the subsequent folds. Is there any way to get running counter?

@sheregeda
Copy link

This call inserts in the template context a pages variable
{% get_pages %}

{{forloop.counter0|add:pages.current_start_index}}

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