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

Consider supporting ranges in the template loop tag #97

Open
fwgreen opened this issue Jan 15, 2022 · 0 comments
Open

Consider supporting ranges in the template loop tag #97

fwgreen opened this issue Jan 15, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@fwgreen
Copy link

fwgreen commented Jan 15, 2022

I would like to be able to do this when paginating:

#for(i in 1...page_count):
 <li class="active"><a href="/items/list/?page=#(i)">#(i)</a></li>
 ...

My current workaround is to create a page count array inside the application:

let page_count = Array(1...items.pageCount)
@fwgreen fwgreen added the enhancement New feature or request label Jan 15, 2022
@fwgreen fwgreen changed the title Consider supporting ranges in template loop tag Consider supporting ranges in the template loop tag Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant