case (switch) block

  • Case block shows the content if case statement is equal to the condition in the When expression.

Example:

{% case "biscuit" %}
{% when "cake" %}
    This is a cake
{% when "cookie", "biscuit" %}
    This is a cookie
{% else %}
    This is neither a cake nor a cookie
{% endcase %}