Math filters

Alex Patton
Math filters do mathematical operations on numbers. Number values contain either integers (numbers without decimal points, like 2) or floats (numbers with decimal points, like 2.5). You can use math filters to do arithmetic calculations (like adding, subtracting, or dividing the value of a numeral) or change how numbers…

String filters

Alex Patton
String filters manipulate strings. You’ll recall that a string is a sequence of characters—letters, numerals, and special characters like punctuation—like your customer’s name, a sentence, or a product ID number. Thus, for the most part, we use string filters to manage the copy in our emails.  For example, you m…

Intermediate filters

Alex Patton
Just got here? This module is part of a full-length Liquid tutorial. Start from the beginning.   In this module, we’ll cover types of filters and how they work with different kinds of values: String filtersMath filtersNumber and currency filtersArray filters  Earlier, you learned that filters cha…

Complex values

Alex Patton
We’ve talked a lot about keys that point to a single value, like this: Code (key)Hi {{ name }}!Output (value)Hope Lee! But you can also have more complex values—which allow you to do a lot of cool things with tags. The complex values are objects and arrays.  Objects An object is a value that’s made up o…

Types of values

Alex Patton
As we’ve discussed, keys and values come in pairs—the key points to the value (aka, the specific piece of data you have stored).  Here are the simple types of values you’ll find in Liquid: StringLetters, numerals, and special charactersNumberIntegers (numbers with no decimal point) and floats (numbers with a …

Understanding key format: JSON

Alex Patton
Time to dig into the actual code that makes up a key! First, let’s review the basics. You’ll remember this diagram of a customer key, which shows how keys and values relate: KeyKeyValuecustomerfirst_name Leelast_name Leeson And you know that, in order to tell Liquid to output the value “Lee,” you use the…

Intermediate keys

Alex Patton
Just got here? This module is part of a full-length Liquid tutorial. Start from the beginning.   In this module, we’ll cover: Understanding key format: JSONTypes of valuesComplex values You already know that a key is used to reference a value. In this module, we’re going to pop the hood and look at th…

Tags

Alex Patton
What’s a tag? You’ve got your personalized salutation down pat, so now it’s time to write the first sentence of our body copy—and make that personal as well. To do that, let’s talk tags (the Liquid kind, not the dog kind).  We’ll start with a quick review. You know that a key is a container for a value, like …

Filters

Alex Patton
What’s a filter? You already know that a key is a container for a value, like a customer’s name. Sometimes that’s all you need to personalize an email!  But you may also want to manipulate how keys are displayed to make your email better. To give a few examples, you might want to: capitalize a word (like a…

Keys

Alex Patton
What’s a key?  At its simplest, a key is a container for a value.  Imagine a box labeled favorite_cake. You open the box, and inside is a red velvet cake. In this analogy, the box is the key, and “Red velvet cake” is the value. In Liquid, it looks like this: Code (key){{ favorite_cake }}Output (value)…
Our mailing list is chock full of tactical lifecycle marketing how-tos, interviews with trending internet businesses, and product updates.