We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following should render "no users found" only in case users is empty.
<ul> {% for user in users %} <li>{{ user.username|e }}</li> {% else %} <li><em>no users found</em></li> {% endfor %} </ul>
This is according to the documentation and my tests confirm it.
Jinjava 2.7.0 renders "no users found" in every loop iteration, as if the "{% else %}" would not exist and the loop end at the "{% endfor %}".
The text was updated successfully, but these errors were encountered:
Interesting I haven't come across this structure before. Should be straightforward to implement here https://github.com/HubSpot/jinjava/blob/master/src/main/java/com/hubspot/jinjava/lib/tag/ForTag.java#L250 when someone gets some free time.
Sorry, something went wrong.
No branches or pull requests
The following should render "no users found" only in case users is empty.
This is according to the documentation and my tests confirm it.
Jinjava 2.7.0 renders "no users found" in every loop iteration, as if the "{% else %}" would not exist and the loop end at the "{% endfor %}".
The text was updated successfully, but these errors were encountered: