php - Not clause for Twig templates -


how do not clause in twig template similar php's !? given sick values of either true or false, tried following, throws error.

{% if !sick %}     kenny not sick. {% elseif dead %}     killed kenny! bastard!!! {% else %}     kenny looks okay --- far {% endif %} 

you should use not keyword negation.

{% if not sick %}     kenny not sick. {% elseif dead %}     killed kenny! bastard!!! {% else %}     kenny looks okay --- far {% endif %} 

following documentation page , answear.


Comments

Popular posts from this blog

apache - Cloudflare bug random 302 redirections -

java - Sql binding in Spring throws org.skife.jdbi.v2.exceptions.UnableToExecuteStatementException -