Skip to main content Link Menu Expand (external link) Document Search Copy Copied

case (switch) block

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


{% 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 %}