-
Notifications
You must be signed in to change notification settings - Fork 641
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
How to access part of a list? #929
Comments
It seems that the new maintainer doesn't think that Python's splice notation is within the project's scope (#851) |
Any update about that? |
Cool. When a new release is planned? |
@zetareticoli and anyone concerned: it was released on 24th of May! :) |
Thanks @krassowski . Fixed with #976 |
Not found any documentation on how to use it. Please, link= |
@zetareticoli: documentation here. Call that function and you'll be able to use it in your templates the same as you would with jinja2. |
in jinja2, we can access part of a list by:
{% for post in site.posts | list[0:4] %}
or
{% for post in site.posts[0:4] %}
but nunjucks seems not provided these filters,
splice
can devide a list into serveral parts, but if I only need first n elements, how to do?The text was updated successfully, but these errors were encountered: