Skip to main content- Introduction to LiquidHow to use Liquid to get the most from Siteglide
- Reference - Exploring the Context ObjectThe context object is a rich source of data about the environment where you are writing Liquid, whether that is a Page, Email etc. This article goes into detail about the different properties and how you can use them.
- Liquid Tutorial 1 - Recognising the syntax of tags, outputs and filtersLearn to recognise different types of Liquid syntax
- Liquid Tutorial 2 - Liquid variables and types
- Liquid Tutorial 3 - Creating Liquid objects and accessing their propertiesThe parse_json tag can be used to create objects from a JSON string. These allow you to represent complex entities with properties, instead of using a bunch of separate variables. Dot notation is a useful way to access those properties later.
- Liquid Tutorial 4- Creating and accessing arrays, including loopingHow to use Liquid For Loops and Indexing to handle arrays. Also, how to use a key to access key maps, using categories as an example.
- Liquid Tutorial 5 - Accessing data from the page and URLSo far we have created variables to store data manually and accessed that data, but often we want to access data that has been provided by external sources. A good place to start is looking at information about the URL and the current Page.
- Liquid Tutorial 6 - LogicUse if statements and case statements to control what happens based on context
- Liquid Tutorial 7 - Looping over an object's propertiesUsing Categories from the context object as an example, we look at a special kind of object (maps) and how to access their properties.
- Liquid Tutorial 8 - Joining Liquid files together with include/renderWith the powerful include and render tag, you can use Liquid to pull in other Liquid files into the file you're working in. This allows you to access oven-ready Siteglide functionality and efficiently re-use your own content across your site.
- Liquid Tutorial 9 - Using WebApp and Module collections
- Liquid Tutorial 10 - Truthiness in Logic: using Liquid to determine if a field is empty or blankImprove the accuracy of your if statements by using the blank keyword to catch a range of falsy states.
- How to safely trigger Liquid functionality when parsing a rich text fieldWe have often been asked if we can add a feature where customers can directly add Liquid code to rich text fields, and have it evaluated and run on the Page. For major security reasons, this is not possible; it would make it so easy for malicious users to POST form data to your site and have a high level of access to critical information. However, you can allow certain Liquid-based functionality in a safe and controlled manner.