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

ruby - How do I merge two hashes into a hash of arrays? -

java - the value of local variable is not used -