Creates a switch statement to compare a variable with different values. case initializes the switch statement, and when compares its values.


{% assign handle = "cake" %}
{% case handle %}
  {% when "cake" %}
     This is a cake
  {% when "cookie" %}
     This is a cookie
  {% else %}
     This is not a cake nor a cookie
{% endcase %}


This is a cake
PDF HTML Epub Powered by Read The Docs