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

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -