- 19 Aug 2025
- 6 minute read
- Print
- DarkLight
- PDF
Content Blocks
- Updated 19 Aug 2025
- 6 minute read
- Print
- DarkLight
- PDF
Content blocks insert large blocks of conditional HTML content into many areas in Slate.
Use cases
Content blocks are handy for information that is frequently reused, like staff email signatures.
They can also be useful for displaying conditional HTML content to specific audiences.

A content block for academic interest resolves to a message about the biology department.
Some examples include:
Showing off improvements to your STEM facilities to only those prospects, current students, or alumni who have expressed an interest in STEM.
Serving information specific to a mailing recipient’s stated academic interest.
Mailing snippets
Content blocks replace what were once known as mailing snippets.
You may see content blocks referred to as mailing snippets in Slate documentation and in the Community. The terms are equivalent.
Inbox Snippets are distinct from content blocks.
Configuring the content block key
To create a new content block or set of content blocks, you must configure a new content block key.
Keys are groupings of content block codes, or snippets of content that belong together. For example, a series of blurbs about academic programs might be created under a single content block key called interests
.
For example, a use case is that Slate University would like to merge in something relevant to the recipient's interest in an academic major. The configuration of a set of content blocks for interest might look like the following:
To create a new content block key:
Go to Deliver → Content Blocks.
Select New Key.
Configure the following settings:
Key: Give this set of Content Blocks a computer-friendly name, like
interest
. It should not include any spaces or special characters.Folder: Place the Content Block in an existing folder, or create a new one by selecting Other and entering a name (in this case, Academic Interests).
Type: Select the type of value that these content blocks should match in the mailing:
String (Discrete Values): You want the value of the content block to exactly match a string. Strings are case-sensitive.
Integer (Inclusive Range of Values): You want the value of the content block to fall within a specified range of integers.
Real Number (Inclusive Range of Values): You want the value of the content block to fall within a specified range of real numbers.
Date (Inclusive Range of Values): You want the value of the content block to fall within a range of dates.
DateTime (Inclusive Range of Values): You want the value of the content blocks to fall within a specified range of dates and times.
Default Snippet (optional): Include a default block to have this content displayed in cases where the data does not match any of the content block values. If no default block is specified, no content appears.
Select Save.
Once a key has been created, you can select Edit to edit these settings.
Configuring the content
Multiple codes can be configured per content block key.
Codes are the technical name for each individual snippet of HTML content that you want to deliver. The value of each content block code must correspond with the type that was selected on the previous screen (ex. string, real, or integer).
To create the content block code:
Select New Code.
Enter the following configurations in the popup window:
Status: Active
Value: For String content blocks, enter a string for the value (e.g., Biology). These values should exactly match the export from the query that will reference the content blocks. For Integer, Real Number, Date, and DateTime content blocks, enter a minimum and maximum value.
Snippet: Use the WYSIWYG editor to create the content for the this content block value.
Select Save.
Repeat steps 1-3 to create additional content blocks that use this key.
Continuing with the Slate University use case, one content block code using the key of interest might look like:
✨ TipFor content blocks where the numeric values are discrete rather than a range, the Minimum Value and the Maximum Value can be the same.
Content block values with special characters
Content block values should not contain special characters such as
ampersands
&
apostrophes
'
quotation marks
"
slashes
/
If content blocks need to match on values that contain special values, use a Custom SQL format mask to replace these characters with their string equivalent. This format mask should be added to whatever export is being referenced in the Content Block merge field.
For example, if you apply a Content Block to their Major field, the Custom SQL format mask should be added to the "Major" export on the associated query.
To replace an ampersand with
and
:replace(@val, '&','and')
To remove an apostrophe:
replace(@val, '''','')
Displaying content blocks
Content blocks are displayed by referencing an export or merge field within areas of Slate that support them. Remember that your content block will leverage the output, or value, of an export/merge field. Be sure to include an export that returns data matching the value you specified when configuring your content block codes.
🔔 The CC field, recipient line, and subject line of a mailing should never be populated with a content block. Use a translation code or liquid markup instead.
To insert a content block as a merge field:
In the WYSIWYG editor, place the cursor where the content block content should appear.
Select Merge Field
in the top row of the WYSIWYG editor.
From the list, select Other.
Enter the following text:
NAME OF EXPORT | block: "KEY OF CONTENT BLOCK"
where NAME OF EXPORT is the name of the export in the recipient list query, and KEY OF CONTENT BLOCK is the key of the content block that contains the codes to merge into your text.
Select OK.
Using the “interest” content block key example with an export labeled “academic_interests”, the merge field will appear as shown:
When viewing the message in the WYSIWYG editor, it will appear simplistic with only the merge fields displayed:
When the content is shown to the intended recipient, however, it will display the content from the specified content block key and code. In Deliver, we can use the Preview Message option to preview this from a prospective recipient’s perspective. For instance, this sample record has an academic major interest of Biology, so the content block code with the value of "Biology" displays:
A sample record with the academic major interest of Physics will display the content block code with the value “Physics”:
💡 Tip
Including a default content block with the content block key ensures that every recipient has content merged in from the content block. If no default content block is included, records without data matching one of the content block values will have a blank line where the content block would otherwise appear.
Example: 🎓 Student Success
Example: Declared major
Imagine you'd like to merge relevant content into a mailing that congratulates the recipient on their choice of academic major. Some of that content might include:
The recipient's name
The name of the major itself
A blurb about the department
A signature from their new advisor with contact information
Their name and their major are one word each, and can be handled by merge fields. However, the HTML formatted content, like the blurb and the signature, are better suited for content blocks.
Setup
Here's an example of a content block for a Biology major. Notice that we can include conditional content inside the content block, like merge fields, or even nested content blocks.
In this example, because two biology majors might have different advisors, we conditionally display the recipient's advisor using a merge field and a content block. The advisor's name is represented by the merge field {{faculty_advisor}}
, and their signature, which includes an image of their headshot, is represented by the nested content block {{faculty_username| block: "advisor_headshot"}}
.
The content block for advisor headshots could then be constructed as follows:
In a mailing
So, here's what you see setting up the mailing in Deliver:
And here's what the recipient sees in their inbox:
Rounding out this example, you could then create content blocks for each remaining major, all represented by the key declared_major, and for each remaining advisor, similarly represented by the key advisor_headshot. The configuration of a set of content block codes for the keys representing academic majors and advisors might look like the following:
Dynamic content blocks
Content blocks can incorporate liquid markup and translation codes, meaning these tools can all be used together.