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
Twig support 'is not' and 'empty': https://twig.symfony.com/doc/2.x/templates.html#test-operator https://twig.symfony.com/doc/2.x/tests/empty.html
But for the combination the highlight doesn't work. Also it doesn't work for 'defined'.
Empty: {{ post.content is empty ? 'action-true' : 'action-false' }} It works. {{ post.content is not empty ? 'action-true' : 'action-false' }} It doesn't work. It equals {{ not post.content ? 'action' }} {{ not post.content is empty ? 'action-true' : 'action-false' }} It works. Defined: {{ test is not defined ? 'action-when-undefined' }} It doesn't work. It doesn't equal {{ not test ? 'action' }} and {{ test is empty ? 'action' }} {{ not test is defined ? 'action-when-undefined' }} It works. {# Defines the variable #} {% set test = false %}
They are correct expressions.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Twig support 'is not' and 'empty':
https://twig.symfony.com/doc/2.x/templates.html#test-operator
https://twig.symfony.com/doc/2.x/tests/empty.html
But for the combination the highlight doesn't work. Also it doesn't work for 'defined'.
They are correct expressions.
The text was updated successfully, but these errors were encountered: