Forum Discussion
Dynamic subject in drop-and-drag template
- 2 years ago
One thing to keep in mind is that the subject line and body are kept separate in Braze. So you probably have to include your loop inside the subject line and template the very first line in the subject line itself.
If you have the loop in the body, but you're trying to template the result of that loop in the subject line, that won't work.
Hope this helps!
Hi deblock1376
I'm assuming you are referring to using liquid templating language in the subject line to display the relevant heading. It should work exactly the same way as liquid in the email body. I'm a bit confused when you say loops.
For example I just tested having the first name added in the subject line for a Drag and Drop email with this liquid and it worked fine.
Here is the actual code you can cut and paste in the subject line to test:
{% if {{${first_name}}} %}Hello {{${first_name}}}
{% else %}Hello
{% endif %}
Some good liquid references in case you need to check the terminology:
Liquid template language (shopify.github.io)
Liquid Filters (braze.com)
Liquid Use Case Library (braze.com)
If this doesn't work let us know and we'll keep looking at it. 😊
Related Content
- 4 months ago
- 2 years ago