Email Templates change two values with one boolean | Community
Skip to main content
New Participant
October 25, 2022
Question

Email Templates change two values with one boolean

  • October 25, 2022
  • 1 reply
  • 993 views

Hi everyone, 

 

In emails there are usually modules which are nearly the same but for the change you need two variables to change. 
Example a module with two columns:

  • Image is aligned right and Text is aligned left.  - or - 
  • Image is aligned left and Text is aligned right. 

Basically it would be possible to just tell the module if the Image should be on the left or the right side. But the alignement of the text has to be changed as well. 

Do you have such cases? 
Do you always create two modules for this? 

Or is there a clever way to ask for just one variable while it is handled in two places differently? 

Best regards
Wolfram

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Jon_Wright
New Participant
October 25, 2022

You could probably do something using a List variable with values ltr,rtl in the template and then use that to change the value for the direction attribute e.g. https://mjml.io/try-it-live/L4aTkYWjm

 

But depends how you want to display on smaller devices also