Liquid
Liquid Intro
Liquid is a simple programming language that tells Shopify what to do. It is used in conjunction with HTML & CSS. There are two types of liquid tags....
- {% put stuff in here %} - this is a logic tag. Nothing will visually appear on the screen when we use this
- {{ put stuff in here }} - this is an output tag. Something will visually appear on the screen when we use this
For example, if we want to display out shop's name in our layout we use the output tags {{ }}...
<h1>{{ shop.name }}<h1>
my shop name
Comments tag
If you want to hide code from Shopify you can use the {% comment %}{% endcomment} tag. Example:
<ol> <li>1</li> {% comment %}<li>2</li>{% comment %} <li>3</li> </ol>
1 3