🚰 Liquid - Theory
Basic
-
What is the Liquid template language?
-
Where in a Shopify store can the Liquid language be used?
-
What are the primary components of the Liquid template language?
-
What are Liquid objects in Shopify, and what types of data do they represent?
-
How can data representation logic be implemented using Liquid?
-
What logical and comparison operators are available in Liquid?
-
What types of data are supported in Liquid?
Tags
-
What types of tags exist in the Liquid language?
-
What is the difference between double curly braces (
{{ }}) and curly braces with percentage delimiters ({% %})? When should each be used? -
What types of conditional tags are there, and how can they be used?
-
What do you know about Liquid tags for HTML forms, and what are their uses?
-
What types of iteration tags are there?
-
What is the pagination iteration tag, and what are its limitations?
-
What do you know about theme tags?
-
How is the
layouttag used? -
What is the difference between the
rendertag and theincludetag? -
Where can the
sectiontag be used? -
What is a
sectiontag, and what is it used for? -
How can a variable be created in Liquid?
-
What is the difference between the
assignandcaptureLiquid tags?
Filters
-
What are filters in Liquid, and what can they be used for?
-
What filters do you know?
-
Provide an example of using array filters.
-
What do you know about collection filters?
-
How can Liquid create a link to a collection page that lists all products of a specific product type?
-
How can Liquid create a link to a collection page that lists all products of a specific product vendor?
-
How can Liquid create a link to a collection page sorted by ascending price?
-
What do you know about color filters?
-
What do you know about customer filters?
-
What do you know about font filters?
-
How can you create a section where a merchant can upload a custom font from the customizer using the
font-facefilter? -
How can we convert a timestamp to a different date format using Liquid filters?
-
What is the
jsonfilter, and how is it used? Provide an example. -
What is
placeholder_svg_tag? -
What do you know about the Liquid
preloadfilter? -
What file-hosting filters are available?
-
How can you create a link to a file in the theme’s
assetsfolder? -
How can you create a link to a file in the store's file storage?
-
What do you know about the
translatefilter? -
What do you know about math filters? Provide an example of their usage.
-
How do you load images on a page using a media filter?
-
How does Shopify load 3D objects by default?
-
What does the
model_viewer_tagdo? -
What do you know about metafield filters?
-
What do you know about money filters, and where are they used?
-
How can you load a dynamic payment button using Liquid filters?
-
What does the
| escapefilter do? -
If you need to convert a string to lowercase and replace whitespaces with dashes, how would you do it (i.e., make a string-like handle)?
-
How do you replace all instances of one word in a string with another word?
-
How can you create an array from a string using a custom separator?
-
How can you remove all whitespace from both sides of a string?
-
What does the
truncatefilter do?- Provide a use case and explain the difference between
truncateandtruncatewords.
- Provide a use case and explain the difference between
Objects
-
What types of data can Liquid objects represent?
-
What object access limitations do you know of?
-
What does the
all_productsobject do, and how can it be used?- What are its limitations?
-
What is the
appobject in Liquid? -
How can you create a section that lists the latest blog articles in the store?
-
What does the
cartobject represent, and how can you check if a specific product is in the cart using Liquid? -
How can you retrieve a collection’s description?
-
How can you get a list of all store collection titles?
-
What is the
content_for_layoutobject? -
How can you create the following condition in Liquid:
- if the user is logged in, display the customer’s name; if not, display a link to the login page
-
What do you know about the
forloopobject, and how can it be used? -
What is the
line_itemobject, where can it be found, and what is it used for? -
How can you retrieve the navigation object in Liquid representing the menu populated by the merchant in the Admin panel’s navigation page
- How can you access subitems?
-
How can you check the media type that loads on a product page?
-
What do you know about metafields, and how can you retrieve this data using Liquid?
-
What are a metafield namespace and key?
-
How can you check if a product has text content in a specific metafield?
-
How can you retrieve metaobject data using Liquid?
-
How can you access a page’s handle, title, and content in Liquid?
-
How can you get a product's availability status?
-
How can you retrieve information about a product’s options?
-
How can you check if a product has only one variant?
-
What is the difference between a product ID and a variant ID?
-
How can you create a custom CSS rule for a section using the Liquid section object?
-
What do you know about the
settingsobject, and how is it used? -
If you need to add a specific link in the
<head>tag for a product page, how would you do it? -
What is the
store_availabilityobject, and what data does it represent?