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

Boolean operator with objects #668

Open
tobiascapin opened this issue Dec 26, 2023 · 0 comments
Open

Boolean operator with objects #668

tobiascapin opened this issue Dec 26, 2023 · 0 comments

Comments

@tobiascapin
Copy link

tobiascapin commented Dec 26, 2023

Hello, I'm migrating my templates from another java library derived from Twig syntax.
I have some troubles with implicit boolean expressions, I cannot understand very well why this expression works:

{% if myobj %}

and why this doesn't work

{% if not myobj %}

I know it can be replaced by {% if myobj is empty %} but since the first works, make it sense to not use the "not"?

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

1 participant