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

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -