HTML Code “Snippets” are small, reusable pieces of code that can be integrated into a larger codebase. You can use these code fragments in templates.
The main difference from variables is that it is not a single word or link, but a piece of HTML code or text that can be inserted into templates.
How to create the snippet?
- Navigate to Snippets Management page (Menu -> Content -> Snippets)
- Click “Add Snippet” button
- Type in name of the Snippet
- Insert the piece of reusable code, then click “Save” button
- You may edit or delete the snippet when it needed. Click the “Action” button for corresponding snippet and then choose edit or delete.
How to use the snippets in templates?
- Navigate to Email Templates Management page (Menu -> Content -> Email Templates)
- Add new template (Drag & drop editor)
- Choose the Custom HTML Snippet block, click or drag to add the Snippet block to the template
- Go to edit content options and click the Snippets button
- Pick the snippet