Forum Discussion
Braze email templates
We have quetions about email templating.
1. Is it possible to validate email templates, for example - check whether certain elements such as Buttons and images have URLs? We are creating content blocks and we want to make sure they contain expected value types.
2. How to prevent changing the styles of an element? For example, we create a content block and the editor should not be able to change the typography styles of the content block when he/she imports and uses it.
3. How to disable automatic color inversion for dark mode on Email clients? Our main theme is light and we don't want to customize our email for dark mode.
4. How to achieve "View in Browser" feature? I read a response in FAQ. I would like to understand how we can automate creating web pages from emails. Is there an event we can listen to and make a webpage that can pull Email for us to process and host?
5. How can we pass variables from template to content blocks when content blocks are added via Liquid code? Let's say there is a button block that should render text inside dynamically. We want this text to be passed from its consumer template.
6. How to remove elements such as Button, Text, Image if they don't have data before sending email?
- astrutynskiActive Member
Hi samandar,
Regarding #3, I was curious if you came across a workaround for dark mode automatic color inversion, specifically how background colors render in dark mode in Gmail App previews for iOS dark mode. I am trying to solve a similar problem with Gmail dark mode background colors rendering off-brand.
- rayelkhoPractitioner III
Hi samandar . These questions are probably best directed to your Braze CSM or Support team. I have tried to help out and answer some of your questions but highly recommend reaching out to your Braze representatives.
- Is it possible to validate email templates, for example - check whether certain elements such as Buttons and images have URLs? We are creating content blocks and we want to make sure they contain expected value types.
To do this, you must preview as a random user or manually enter the values as a custom user. Once you do that, the preview pane will show the email and you can grab the HTML from there. Alternatively, you can send your self a test email and download the HTML from there.
4. How to achieve "View in Browser" feature? I read a response in FAQ. I would like to understand how we can automate creating web pages from emails. Is there an event we can listen to and make a webpage that can pull Email for us to process and host?
Perhaps you need this: https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/message_archiving/#overview.
5. How can we pass variables from template to content blocks when content blocks are added via Liquid code? Let's say there is a button block that should render text inside dynamically. We want this text to be passed from its consumer template.
Not sure I understand the challenge but content blocks expand in the template, so you should just be able to use anything in a content block inside the template.6. How to remove elements such as Button, Text, Image if they don't have data before sending email?
You may need to leverage conditional logic here: https://www.braze.com/docs/user_guide/personalization_and_dynamic_content/liquid/conditional_logic - Is it possible to validate email templates, for example - check whether certain elements such as Buttons and images have URLs? We are creating content blocks and we want to make sure they contain expected value types.
Related Content
- 11 months ago
- 11 months ago
- 29 days ago
- 2 years ago