Re: Email Templates change two values with one boolean

WolframLotz
Level 4

Email Templates change two values with one boolean

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

1 REPLY 1
Jon_Wright
Level 4

Re: Email Templates change two values with one boolean

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