
Shopify Theme Customization with Liquid
By :

In the previous chapters, we saw some control flow tags, such as if
, and
, and or
, in action; now we will dive further into this topic and learn about all the control flow types of tags and how to use them. Control flow tags are a type of Liquid programming logic that tells our Liquid code what to do by allowing us to be selective about which block of code should execute under specific conditions. We can divide the control flow tags into four separate groups:
if/else/elsif
and/or
case/when
unless
We have had the pleasure of seeing the conditional if
statement in some of our previous examples, which, if proved true, execute the code inside our statement. Let's see it in action. In the previous chapter, we created the Learning about the page handle page.
However, let's try and create a new page for this exercise to solidify our knowledge and keep everything concise: