You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{%ifnotmy_array%} // empty array will result in that if body rendering
{%ifnotusername%} // empty string or null values will result in that if body rendering
{%ifuserandnotuser.is_admin%} // render if user exists but is not an admin
The not should be a keyword only used in the condition node but should be reserved globally as a Tera keyword in case we want to expand its use
The text was updated successfully, but these errors were encountered:
Keats
changed the title
Add not to mean !, I don't even know if we handle negative right now
Add not to mean !
Jun 29, 2016
In condition nodes.
Currently there's no way to indicate negation in if/elif.
For booleans we can do:
but that's obviously not ideal and doesn't work for truthy values (truthiness defined there https://github.com/Keats/tera/blob/master/src/context.rs#L86-L99)
We want to be able to express negation like so:
The
not
should be a keyword only used in the condition node but should be reserved globally as a Tera keyword in case we want to expand its useThe text was updated successfully, but these errors were encountered: