🦙
Alpaco Developer Documentation
  • Introduction
  • Fundamentals
    • What are the fundamentals
    • Creating an email
  • Template
    • Base
    • Blocks
    • Input Groups
      • Input Types
        • Text String
        • Textarea
        • Select
        • Boolean
        • Image
          • Image settings
        • Color Picker
  • Account settings
    • Integrations
    • Merge Tags
  • How to
    • Validate inputs
    • Subject line & Preheader
    • Escape code from the editor
    • Use custom fonts
Powered by GitBook
On this page
  • Raw code
  • Preview only
  1. How to

Escape code from the editor

Sometimes you want to display something for the editor, but have some other code executed on export, or sometimes you just want the code editor to leave your delicate ESP specific variables alone

We know how important your code is to you and the slightest little mistake can be detrimental to your output. So we've created two tags for you that each serves their purpose.

Raw code

This tag tells the editor to disregard whatever is within in. The code won't be processed by the Editor, but it will be present at export for your ESP to process. This is useful when you have something you don't want the Editor to try and process, but still want it present for your own data processing in your ESP.

{% raw %}
// This is not processed by the Editor, but will be exported for your ESP
{% endraw %}

Preview only

This tag give you some options to show something in the editor, but have something else displayed at export. This is particular useful for something like product variables or a recommended feed. You can have something neat and informative displayed for the user, but at the export have all the necessary variables injected that the user should not see.

{% if preview_only == true %}
// This is shown in the Editor for visual purposes
{% else %}
// But this is what's actually exported for the ESP
{% endif %}
PreviousSubject line & PreheaderNextUse custom fonts

Last updated 14 days ago